From 5c2a7d9fed465403758edda57acc59a4879cae56 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Wed, 2 Nov 2016 14:36:29 +0000 Subject: 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 --- src/Fl_File_Chooser2.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.2.3