diff options
Diffstat (limited to 'body/c_fl_clock.cpp')
-rw-r--r-- | body/c_fl_clock.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/body/c_fl_clock.cpp b/body/c_fl_clock.cpp index e2df99c..2828f9e 100644 --- a/body/c_fl_clock.cpp +++ b/body/c_fl_clock.cpp @@ -6,6 +6,7 @@ #include <FL/Fl_Clock.H> #include "c_fl_clock.h" +#include "c_fl.h" @@ -55,7 +56,11 @@ CLOCK new_fl_clock2(unsigned char k, int x, int y, int w, int h, char* label) { } void free_fl_clock(CLOCK c) { - delete static_cast<My_Clock*>(c); + if (fl_inside_callback) { + fl_delete_widget(c); + } else { + delete static_cast<My_Clock*>(c); + } } |