summaryrefslogtreecommitdiff
path: root/src/Fl_File_Icon2.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2001-12-05 00:06:41 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2001-12-05 00:06:41 +0000
commit2fbee9c1500a7b3862732bdfa2ad6fef9dcc3092 (patch)
treeb21d36a0dd1832c6b7eb33f6390e64b791642304 /src/Fl_File_Icon2.cxx
parentfc3999a24ed8c82c5bca139e7fd63f9c0a6b9058 (diff)
Segfault fixes...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_File_Icon2.cxx')
-rw-r--r--src/Fl_File_Icon2.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx
index 7252ce9e6..1f8e77783 100644
--- a/src/Fl_File_Icon2.cxx
+++ b/src/Fl_File_Icon2.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_File_Icon2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $"
+// "$Id: Fl_File_Icon2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $"
//
// Fl_File_Icon system icon routines.
//
@@ -333,7 +333,7 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
img = Fl_Shared_Image::get(ifile);
- if (!img->w() && !img->h()) return -1;
+ if (!img || !img->count() || !img->w() || !img->h()) return -1;
if (img->count() == 1) {
int x, y; // X & Y in image
@@ -521,7 +521,6 @@ Fl_File_Icon::load_image(const char *ifile) // I - File to read from
lineptr = *ptr;
startx = 0;
ch = bg;
- ptr ++;
for (x = 0; x < img->w(); x ++, lineptr ++)
if (*lineptr != ch)
@@ -924,5 +923,5 @@ get_kde_val(char *str,
//
-// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $".
+// End of "$Id: Fl_File_Icon2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $".
//