diff options
Diffstat (limited to 'src/Fl_Counter.cxx')
| -rw-r--r-- | src/Fl_Counter.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Fl_Counter.cxx b/src/Fl_Counter.cxx index b77fc8a4c..de83f15d5 100644 --- a/src/Fl_Counter.cxx +++ b/src/Fl_Counter.cxx @@ -137,14 +137,19 @@ int Fl_Counter::handle(int event) { return 1; case FL_PUSH: if (Fl::visible_focus()) Fl::focus(this); - handle_push(); + { Fl_Widget_Tracker wp(this); + handle_push(); + if (wp.deleted()) return 1; + } case FL_DRAG: i = calc_mouseobj(); if (i != mouseobj) { Fl::remove_timeout(repeat_callback, this); mouseobj = (uchar)i; if (i) Fl::add_timeout(INITIALREPEAT, repeat_callback, this); + Fl_Widget_Tracker wp(this); increment_cb(); + if (wp.deleted()) return 1; redraw(); } return 1; |
