summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-01-22 18:23:39 +0100
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2025-01-22 18:23:39 +0100
commit2bcfcc332d9a6bc121af102f5a5d5d9eba02b603 (patch)
tree54d9f3087de27d08e740d3226c1785695393ae1b
parentbcb679804b2040e3fee1e4f1ff05163674aa7f08 (diff)
Remove incorrect use of Fl_Window::current() in Fl_Quartz_Image_Surface_Driver c'tor
Fl_Window::current() can refer to a deleted window is some scenarios
-rw-r--r--src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx2
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 5091f894b..1e3d6b927 100644
--- a/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
+++ b/src/drivers/Quartz/Fl_Quartz_Image_Surface_Driver.cxx
@@ -30,7 +30,7 @@ Fl_Quartz_Image_Surface_Driver::Fl_Quartz_Image_Surface_Driver(int w, int h, int
float s = 1;
if (high_res) {
s = Fl_Graphics_Driver::default_driver().scale();
- Fl_Window *cw = Fl_Window::current();
+ Fl_Window *cw = Fl::first_window();
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;