diff --git a/CHANGES b/CHANGES index a7430c19020da11e70970c0a724914c7a4b0f203..e8810a4ce67ebdf0dab1ed105bc3f2dbacfe7a18 100644 --- a/CHANGES +++ b/CHANGES @@ -1,9 +1,16 @@ CHANGES IN FLTK 1.1.0b7 - - - Some Win32 drivers would draw into wrong buffers - after OpenGL mode change - - Message handling and Resources for Mac port + - More documentation updates... + - The file chooser would cause a segfault if you + clicked in an empty area of the file list. + - Fl_File_Icon::labeltype() would cause a segfault + if the value pointer was NULL. + - Fl_File_Icon::load_image() could cause segfaults + (NULL data and incrementing the data pointer too + often.) + - Some Win32 drivers would draw into wrong buffers + after OpenGL mode change. + - Message handling and Resources for MacOS port. - Fl_Help_View could get in an infinitely loop when determining the maximum width of the page; this was due to a bug in the get_length() method with diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index 62af750038162d35c7999e3c190613c5c15bb98a..3bcdb90b2f7feb91b30198bb5d0ba8b7283712fa 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $" +// "$Id: Fl_File_Chooser2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $" // // More Fl_File_Chooser routines. // @@ -424,6 +424,9 @@ Fl_File_Chooser::fileListCB() filename = (char *)fileList->text(fileList->value()); + if (!filename) + return; + if (directory_[0] != '\0') snprintf(pathname, sizeof(pathname), "%s/%s", directory_, filename); else @@ -704,5 +707,5 @@ Fl_File_Chooser::fileNameCB() // -// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.4 2001/11/25 16:38:11 easysw Exp $". +// End of "$Id: Fl_File_Chooser2.cxx,v 1.1.2.5 2001/12/05 00:06:41 easysw Exp $". // diff --git a/src/Fl_File_Icon.cxx b/src/Fl_File_Icon.cxx index 665b989110a408c422be449f2bfa5d47e03eebe5..adb80311dcae6032723ea2194d2c9dc5d0583411 100644 --- a/src/Fl_File_Icon.cxx +++ b/src/Fl_File_Icon.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_File_Icon.cxx,v 1.1.2.5 2001/11/17 15:27:15 easysw Exp $" +// "$Id: Fl_File_Icon.cxx,v 1.1.2.6 2001/12/05 00:06:41 easysw Exp $" // // Fl_File_Icon routines. // @@ -461,11 +461,10 @@ Fl_File_Icon::labeltype(const Fl_Label *o, // I - Label data (void)a; icon = (Fl_File_Icon *)(o->value); - - icon->draw(x, y, w, h, (Fl_Color)(o->color)); + if (icon) icon->draw(x, y, w, h, (Fl_Color)(o->color)); } // -// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.5 2001/11/17 15:27:15 easysw Exp $". +// End of "$Id: Fl_File_Icon.cxx,v 1.1.2.6 2001/12/05 00:06:41 easysw Exp $". // diff --git a/src/Fl_File_Icon2.cxx b/src/Fl_File_Icon2.cxx index 7252ce9e6e8b04047e3bdf281f2a4c01ce1453e9..1f8e77783c8fe74f08d101d02d7a984b3c6cc5d6 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 $". //