From 941c301cebc5e636667cca1ae8f3938a25d770df Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 23 Feb 2016 20:37:22 +0000 Subject: Fix Fl_RGB_Image::uncache() and Fl_Bitmap::uncache(). It is not possible to use fl_graphics_driver in these functions because when they are called *fl_graphics_driver may have been deleted. A solution is to use Fl_Display_Device::display_device()->driver() instead which is always valid. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11212 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Bitmap.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Fl_Bitmap.cxx') diff --git a/src/Fl_Bitmap.cxx b/src/Fl_Bitmap.cxx index b5fa32c2c..4d637548a 100644 --- a/src/Fl_Bitmap.cxx +++ b/src/Fl_Bitmap.cxx @@ -34,7 +34,7 @@ Fl_Bitmask fl_create_bitmask(int w, int h, const uchar *array) { } void fl_delete_bitmask(Fl_Bitmask bm) { - return fl_graphics_driver->delete_bitmask(bm); + return Fl_Display_Device::display_device()->driver()->delete_bitmask(bm); } // Create a 1-bit mask used for alpha blending @@ -147,7 +147,7 @@ Fl_Bitmap::~Fl_Bitmap() { void Fl_Bitmap::uncache() { if (id_) { - fl_graphics_driver->uncache(this, id_); + fl_delete_bitmask((Fl_Bitmask)id_); id_ = 0; } } -- cgit v1.2.3