summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx3
1 files changed, 2 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 00fc63150..5091f894b 100644
--- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
@@ -31,7 +31,8 @@ Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int
if (high_res) {
s = Fl_Graphics_Driver::default_driver().scale();
Fl_Window *cw = Fl_Window::current();
- if (cw && Fl_Cocoa_Window_Driver::driver(cw)->mapped_to_retina()) s *= 2;
+ Fl_Cocoa_Window_Driver *dr = cw ? Fl_Cocoa_Window_Driver::driver(cw) : NULL;
+ if (dr && dr->mapped_to_retina()) s *= 2;
W *= s; H *= s;
}
CGColorSpaceRef lut = CGColorSpaceCreateDeviceRGB();