diff options
Diffstat (limited to 'body/c_fl_adjuster.cpp')
-rw-r--r-- | body/c_fl_adjuster.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/body/c_fl_adjuster.cpp b/body/c_fl_adjuster.cpp index 37a52cd..5550250 100644 --- a/body/c_fl_adjuster.cpp +++ b/body/c_fl_adjuster.cpp @@ -6,6 +6,7 @@ #include <FL/Fl_Adjuster.H> #include "c_fl_adjuster.h" +#include "c_fl.h" @@ -67,7 +68,11 @@ ADJUSTER new_fl_adjuster(int x, int y, int w, int h, char* label) { } void free_fl_adjuster(ADJUSTER a) { - delete static_cast<My_Adjuster*>(a); + if (fl_inside_callback) { + fl_delete_widget(a); + } else { + delete static_cast<My_Adjuster*>(a); + } } |