diff options
Diffstat (limited to 'InOut/widgets.cpp')
-rw-r--r-- | InOut/widgets.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/InOut/widgets.cpp b/InOut/widgets.cpp index c50be84c..ca0ab0ae 100644 --- a/InOut/widgets.cpp +++ b/InOut/widgets.cpp @@ -3240,7 +3240,7 @@ extern "C" { { //char *text = p->itext->data; Fl_Box *o = new Fl_Box((int)*p->ix, (int)*p->iy, - (int)*p->iwidth, (int)*p->iheight, text); + (int)*p->iwidth, (int)*p->iheight, strdup(text)); widget_attributes(csound, o); Fl_Boxtype type; int itype = (int) *p->itype; @@ -3324,6 +3324,7 @@ extern "C" { char *text = p->itext->data; ADDR_SET_VALUE v = widgetGlobals->AddrSetValue[(int) *p->ihandle]; Fl_Widget *o = (Fl_Widget *) v.WidgAddress; + free((void*)o->label()); o->label(text); return OK; } @@ -3338,7 +3339,8 @@ extern "C" { Fl_Widget *o = (Fl_Widget *) v.WidgAddress; if (i<0 || i>csound->GetStrsmax(csound)) text = (char *) "???"; else if ((text=csound->GetStrsets(csound,i))==NULL) text = (char *) "???"; - o->label(text); + free((void*)o->label()); + o->label(strdup(text)); return OK; } |