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
This commit is contained in:
Matthias Melcher 2006-12-21 22:39:11 +00:00
parent 1c47b9826d
commit 2c16ddb964
2 changed files with 4 additions and 1 deletions

View File

@ -130,8 +130,10 @@ Fl_RGB_Image::~Fl_RGB_Image() {
void Fl_RGB_Image::uncache() { void Fl_RGB_Image::uncache() {
#ifdef __APPLE_QUARTZ__ #ifdef __APPLE_QUARTZ__
if (id) if (id) {
CGImageRelease((CGImageRef)id); CGImageRelease((CGImageRef)id);
id = 0;
}
#else #else
if (id) { if (id) {
fl_delete_offscreen((Fl_Offscreen)id); fl_delete_offscreen((Fl_Offscreen)id);

View File

@ -60,6 +60,7 @@ int main(int argc, char ** argv) {
Fl::get_system_colors(); Fl::get_system_colors();
Fl::background(113,113,198); Fl::background(113,113,198);
#else // this code uses the nice bright blue background to show box vs. frame types #else // this code uses the nice bright blue background to show box vs. frame types
Fl::args(argc, argv);
Fl::get_system_colors(); Fl::get_system_colors();
window->color(12);// light blue window->color(12);// light blue
#endif #endif