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
This commit is contained in:
Manolo Gouy 2016-11-02 14:36:29 +00:00
parent fdbf426782
commit 5c2a7d9fed
1 changed files with 1 additions and 0 deletions

View File

@ -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);