summaryrefslogtreecommitdiff
path: root/body/c_fl_round_clock.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'body/c_fl_round_clock.cpp')
-rw-r--r--body/c_fl_round_clock.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/body/c_fl_round_clock.cpp b/body/c_fl_round_clock.cpp
index 0036c00..85774c8 100644
--- a/body/c_fl_round_clock.cpp
+++ b/body/c_fl_round_clock.cpp
@@ -6,6 +6,7 @@
#include <FL/Fl_Round_Clock.H>
#include "c_fl_round_clock.h"
+#include "c_fl.h"
@@ -50,7 +51,11 @@ ROUNDCLOCK new_fl_round_clock(int x, int y, int w, int h, char* label) {
}
void free_fl_round_clock(ROUNDCLOCK c) {
- delete static_cast<My_Round_Clock*>(c);
+ if (fl_inside_callback) {
+ fl_delete_widget(c);
+ } else {
+ delete static_cast<My_Round_Clock*>(c);
+ }
}