diff options
| author | Manolo Gouy <Manolo> | 2018-04-26 12:00:49 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-04-26 12:00:49 +0000 |
| commit | 9c389d34f981b06affdb63fd5fdf20da61283277 (patch) | |
| tree | 246fb0204362f8787804ae03031c62ad66d6a8c9 /src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx | |
| parent | dd93cbd88860b142dc7fff99956cbf88b403be03 (diff) | |
Simplify API for Fl_Image_Surface::Fl_Image_Surface(int w, int h, int high_res, Fl_Offscreen off) with non-null offscreen.
The caller no longer needs to call Fl_Image_Surface::get_offscreen_before_delete() before object deletion,
because the object destructor knows the offscreen has not been created by the Fl_Image_Surface constructor.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12874 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx')
| -rw-r--r-- | src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx index 1910d3f46..4eae3d58f 100644 --- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx +++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx @@ -72,7 +72,7 @@ Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int } Fl_Quartz_Image_Surface_Driver::~Fl_Quartz_Image_Surface_Driver() { - if (offscreen) { + if (offscreen && !external_offscreen) { void *data = CGBitmapContextGetData(offscreen); free(data); CGContextRelease((CGContextRef)offscreen); |
