From d74f373552a2744532483ed1562401a3b28e5cd4 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Mon, 30 Nov 2015 12:46:42 +0000 Subject: Mac OS: allow calling Fl_Gl_Window::pixel_w() before the window is shown. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 8089f75df..f9a11178a 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2734,7 +2734,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil; // For Fl_Gl_Window on retina display, returns 2, otherwise 1 int Fl_X::resolution_scaling_factor(Fl_Window* win) { - return (fl_mac_os_version >= 100700 && win->as_gl_window() && Fl::use_high_res_GL() && win->i->mapped_to_retina()) ? 2 : 1; + return (fl_mac_os_version >= 100700 && win->as_gl_window() && Fl::use_high_res_GL() && win->i && win->i->mapped_to_retina()) ? 2 : 1; } -- cgit v1.2.3