diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-12-03 02:51:03 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2004-12-03 02:51:03 +0000 |
| commit | 416ff7f24ef0f2c1b9f3d1118366a0d33124ac1a (patch) | |
| tree | a0da36b851f1f2d19a962c98cd599185e51bf0cd /src/Fl_Shared_Image.cxx | |
| parent | 0184365c807d9ca2b414ff52d7d5c1b36e1e4d30 (diff) | |
Fl_Shared_Image::reload() didn't set the image_ pointer properly
in all cases (STR #632)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@3929 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Shared_Image.cxx')
| -rw-r--r-- | src/Fl_Shared_Image.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fl_Shared_Image.cxx b/src/Fl_Shared_Image.cxx index 14b907a6a..66ff62709 100644 --- a/src/Fl_Shared_Image.cxx +++ b/src/Fl_Shared_Image.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Shared_Image.cxx,v 1.23.2.21 2004/09/24 16:00:11 easysw Exp $" +// "$Id: Fl_Shared_Image.cxx,v 1.23.2.22 2004/12/03 02:51:03 easysw Exp $" // // Shared image code for the Fast Light Tool Kit (FLTK). // @@ -245,14 +245,15 @@ Fl_Shared_Image::reload() { if (img) { if (alloc_image_) delete image_; - image_ = img; alloc_image_ = 1; if ((img->w() != w() && w()) || (img->h() != h() && h())) { // Make sure the reloaded image is the same size as the existing one. Fl_Image *temp = img->copy(w(), h()); delete img; - img = temp; + image_ = temp; + } else { + image_ = img; } update(); @@ -460,5 +461,5 @@ Fl_Shared_Image::remove_handler(Fl_Shared_Handler f) { // -// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.21 2004/09/24 16:00:11 easysw Exp $". +// End of "$Id: Fl_Shared_Image.cxx,v 1.23.2.22 2004/12/03 02:51:03 easysw Exp $". // |
