diff options
| -rw-r--r-- | CHANGES | 1 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 10 |
2 files changed, 9 insertions, 2 deletions
@@ -54,6 +54,7 @@ CHANGES IN FLTK 1.3.4 RELEASED: ??? ?? ???? Bug fixes + - Fixed missing image release in fluid (STR #2840). - Fixed out-of-bounds memory access in fluid (STR #3263). - fluid doesn't output trailing white space in .fl files after some statements anymore (STR #3239). diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index 55152a9f3..d2574921a 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -215,8 +215,14 @@ Fl_Widget_Type::~Fl_Widget_Type() { } if (subclass_) free((void*)subclass_); if (tooltip_) free((void*)tooltip_); - if (image_name_) free((void*)image_name_); - if (inactive_name_) free((void*)inactive_name_); + if (image_name_) { + free((void*)image_name_); + if (image) image->decrement(); + } + if (inactive_name_) { + free((void*)inactive_name_); + if (inactive) inactive->decrement(); + } for (int n=0; n<NUM_EXTRA_CODE; n++) { if (extra_code_[n]) free((void*) extra_code_[n]); } |
