diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-10-01 19:38:28 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2001-10-01 19:38:28 +0000 |
| commit | 7593a59e87a49b4d0a3126011b6a7eb21e15387b (patch) | |
| tree | 8ce790eba24f13c1e7d43736f2e77ba092cd5186 | |
| parent | 8b52561ca3e45795a9dd41ff0346d7e5fbd901a2 (diff) | |
FLUID: can't use "i->image(o)" if "i" is NULL... :)
Fl_Help_View: Don't need "if (!orig) free(img->data);" - that condition
can never occur...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1631 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 6 | ||||
| -rw-r--r-- | fluid/Fl_Widget_Type.cxx | 10 | ||||
| -rw-r--r-- | src/Fl_Help_View.cxx | 7 |
3 files changed, 14 insertions, 9 deletions
@@ -6,6 +6,12 @@ CHANGES IN FLTK 1.1.0b4 - Updated the config.h files for all platforms for the image and FLTK documentation defines. + - FLUID would crash if you cleared an image for a + widget. + + - Fl_Help_View::add_image() did not initialize the image + member of the base (unscaled) image. + CHANGES IN FLTK 1.1.0b3 diff --git a/fluid/Fl_Widget_Type.cxx b/fluid/Fl_Widget_Type.cxx index fca9df8e8..aff78506e 100644 --- a/fluid/Fl_Widget_Type.cxx +++ b/fluid/Fl_Widget_Type.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.4 2001/09/29 22:59:45 easysw Exp $" +// "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.5 2001/10/01 19:38:28 easysw Exp $" // // Widget type code for the Fast Light Tool Kit (FLTK). // @@ -146,7 +146,8 @@ void Fl_Widget_Type::setimage(Fluid_Image *i) { if (image) image->decrement(); if (i) i->increment(); image = i; - i->image(o); + if (i) i->image(o); + else o->image(0); redraw(); } @@ -155,7 +156,8 @@ void Fl_Widget_Type::setinactive(Fluid_Image *i) { if (inactive) inactive->decrement(); if (i) i->increment(); inactive = i; - i->deimage(o); + if (i) i->deimage(o); + else o->deimage(0); redraw(); } @@ -1955,5 +1957,5 @@ int Fl_Widget_Type::read_fdesign(const char* name, const char* value) { } // -// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.4 2001/09/29 22:59:45 easysw Exp $". +// End of "$Id: Fl_Widget_Type.cxx,v 1.15.2.16.2.5 2001/10/01 19:38:28 easysw Exp $". // diff --git a/src/Fl_Help_View.cxx b/src/Fl_Help_View.cxx index 1cffa8069..4cc2180d2 100644 --- a/src/Fl_Help_View.cxx +++ b/src/Fl_Help_View.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Help_View.cxx,v 1.1.2.2 2001/10/01 19:33:22 easysw Exp $" +// "$Id: Fl_Help_View.cxx,v 1.1.2.3 2001/10/01 19:38:28 easysw Exp $" // // Fl_Help_View widget routines. // @@ -728,9 +728,6 @@ Fl_Help_View::add_image(const char *name, // I - Path of image } // Finally, copy the new size and data to the image structure... - if (!orig) - free(img->data); - img->w = width; img->h = height; img->data = scaled; @@ -3581,5 +3578,5 @@ scrollbar_callback(Fl_Widget *s, void *) // -// End of "$Id: Fl_Help_View.cxx,v 1.1.2.2 2001/10/01 19:33:22 easysw Exp $". +// End of "$Id: Fl_Help_View.cxx,v 1.1.2.3 2001/10/01 19:38:28 easysw Exp $". // |
