Segfault fixes...

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1809 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Michael R Sweet
2001-12-05 00:06:41 +00:00
parent fc3999a24e
commit 2fbee9c150
4 changed files with 22 additions and 14 deletions
+11 -4
View File
@@ -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
+5 -2
View File
@@ -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 $".
//
+3 -4
View File
@@ -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 $".
//
+3 -4
View File
@@ -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 $".
//