diff options
Diffstat (limited to 'FL')
| -rw-r--r-- | FL/Fl_Input_Choice.H | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/FL/Fl_Input_Choice.H b/FL/Fl_Input_Choice.H index a5d025523..0010ea336 100644 --- a/FL/Fl_Input_Choice.H +++ b/FL/Fl_Input_Choice.H @@ -76,6 +76,7 @@ class Fl_Input_Choice : public Fl_Group { static void menu_cb(Fl_Widget*, void *data) { Fl_Input_Choice *o=(Fl_Input_Choice *)data; + Fl_Widget_Tracker wp(o); const Fl_Menu_Item *item = o->menubutton()->mvalue(); if (item && item->flags & (FL_SUBMENU|FL_SUBMENU_POINTER)) return; // ignore submenus if (!strcmp(o->inp_->value(), o->menu_->text())) @@ -92,6 +93,8 @@ class Fl_Input_Choice : public Fl_Group { if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) o->do_callback(); } + + if (wp.deleted()) return; if (o->callback() != default_callback) { @@ -102,6 +105,7 @@ class Fl_Input_Choice : public Fl_Group { static void inp_cb(Fl_Widget*, void *data) { Fl_Input_Choice *o=(Fl_Input_Choice *)data; + Fl_Widget_Tracker wp(o); if (o->inp_->changed()) { o->Fl_Widget::set_changed(); if (o->when() & (FL_WHEN_CHANGED|FL_WHEN_RELEASE)) @@ -111,6 +115,8 @@ class Fl_Input_Choice : public Fl_Group { if (o->when() & FL_WHEN_NOT_CHANGED) o->do_callback(); } + + if (wp.deleted()) return; if (o->callback() != default_callback) o->Fl_Widget::clear_changed(); |
