summaryrefslogtreecommitdiff
path: root/src/drivers/Quartz
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/Quartz')
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
index ac705fcd5..c32a7b7f4 100644
--- a/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Graphics_Driver_image.cxx
@@ -259,9 +259,8 @@ void Fl_Quartz_Graphics_Driver::cache(Fl_Pixmap *img) {
Fl_Image_Surface *surf = new Fl_Image_Surface(img->data_w(), img->data_h());
Fl_Surface_Device::push_current(surf);
fl_draw_pixmap(img->data(), 0, 0, FL_BLACK);
- CGContextRef src = surf->get_offscreen_before_delete();
Fl_Surface_Device::pop_current();
- delete surf;
+ CGContextRef src = Fl_Graphics_Driver::get_offscreen_and_delete_image_surface(surf);
void *cgdata = CGBitmapContextGetData(src);
int sw = CGBitmapContextGetWidth(src);
int sh = CGBitmapContextGetHeight(src);