diff options
Diffstat (limited to 'body/c_fl_clock_output.cpp')
-rw-r--r-- | body/c_fl_clock_output.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/body/c_fl_clock_output.cpp b/body/c_fl_clock_output.cpp index a34b1c4..7e977f3 100644 --- a/body/c_fl_clock_output.cpp +++ b/body/c_fl_clock_output.cpp @@ -6,6 +6,7 @@ #include <FL/Fl_Clock.H> #include "c_fl_clock_output.h" +#include "c_fl.h" @@ -61,7 +62,11 @@ CLOCKOUTPUT new_fl_clock_output(int x, int y, int w, int h, char* label) { } void free_fl_clock_output(CLOCKOUTPUT c) { - delete static_cast<My_Clock_Output*>(c); + if (fl_inside_callback) { + fl_delete_widget(c); + } else { + delete static_cast<My_Clock_Output*>(c); + } } |