summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Melcher <fltk@matthiasm.com>2006-12-21 22:39:11 +0000
committerMatthias Melcher <fltk@matthiasm.com>2006-12-21 22:39:11 +0000
commit2c16ddb964a8e13532f8e4c6e5bf0da0af283745 (patch)
treed0e2d7b4d908c1b13214e86e3692c9e0c36e8d41
parent1c47b9826d72b427d08ebc4f07cead801067708b (diff)
Fixed silly bug in OS X that would free a pixmap multiple times within Fl_RGB_Image::unchache.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5566 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
-rw-r--r--src/Fl_Image.cxx4
-rw-r--r--test/boxtype.cxx1
2 files changed, 4 insertions, 1 deletions
diff --git a/src/Fl_Image.cxx b/src/Fl_Image.cxx
index bfb9a8eec..50922af92 100644
--- a/src/Fl_Image.cxx
+++ b/src/Fl_Image.cxx
@@ -130,8 +130,10 @@ Fl_RGB_Image::~Fl_RGB_Image() {
void Fl_RGB_Image::uncache() {
#ifdef __APPLE_QUARTZ__
- if (id)
+ if (id) {
CGImageRelease((CGImageRef)id);
+ id = 0;
+ }
#else
if (id) {
fl_delete_offscreen((Fl_Offscreen)id);
diff --git a/test/boxtype.cxx b/test/boxtype.cxx
index 7db8433f0..34819f601 100644
--- a/test/boxtype.cxx
+++ b/test/boxtype.cxx
@@ -60,6 +60,7 @@ int main(int argc, char ** argv) {
Fl::get_system_colors();
Fl::background(113,113,198);
#else // this code uses the nice bright blue background to show box vs. frame types
+ Fl::args(argc, argv);
Fl::get_system_colors();
window->color(12);// light blue
#endif