summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2016-11-02 14:36:29 +0000
committerManolo Gouy <Manolo>2016-11-02 14:36:29 +0000
commit5c2a7d9fed465403758edda57acc59a4879cae56 (patch)
tree97bd6e25a24c0e0b39a92c367eb2a7658bdb650c /src/Fl_File_Chooser2.cxx
parentfdbf4267827266579d35678736032c87bbba0914 (diff)
Close small memory leak in Fl_File_Chooser: a bad image file creates an Fl_Shared_Image but never releases it.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@12075 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 3f3ceb05d..71c51f8ac 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1364,6 +1364,7 @@ Fl_File_Chooser::update_preview()
(image->h() <= 0) ||
(image->d() < 0) ||
(image->count() <= 0))) {
+ image->release();
// Image has errors? Show big 'X'
previewBox->label("X");
previewBox->align(FL_ALIGN_CLIP);