Fixed missing image release as described in STR #2840.

Thanks to OP (Nikego) and Matt!


git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10888 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Albrecht Schlosser
2015-11-07 00:11:45 +00:00
parent da6dff26fc
commit 144c656360
2 changed files with 9 additions and 2 deletions
+1
View File
@@ -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).
+8 -2
View File
@@ -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]);
}