summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-02-08 19:30:52 +0000
committerManolo Gouy <Manolo>2015-02-08 19:30:52 +0000
commit50575289636644581ee94c172df7aed874f17747 (patch)
treeba92738550cd7aa8ff9befba44da39e1eae99750
parent1dd0cdcee9a517ccea5e121ee58695444c35b5a3 (diff)
Fix for STR#3131 : .xbm images were not previewed
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10561 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_File_Chooser2.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index 84a17beb0..e186c140b 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -1427,7 +1427,8 @@ Fl_File_Chooser::update_preview()
}
} else if (image && ( (image->w() <= 0) ||
(image->h() <= 0) ||
- (image->d() <= 0) )) {
+ (image->d() < 0) ||
+ (image->count() <= 0))) {
// Image has errors? Show big 'X'
previewBox->label("X");
previewBox->align(FL_ALIGN_CLIP);