diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-12 19:46:27 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2023-12-12 19:46:38 +0100 |
| commit | a20bace4e101d6e54bb190fa1ac55a8483f152e7 (patch) | |
| tree | 914d0af066850bc4b79227e485c2911992a83c47 /src | |
| parent | 28c7c584fa18c23d2c9825978d70b7e4f93e128b (diff) | |
macOS platform + GLUT: fix crash with glut_test app
Diffstat (limited to 'src')
| -rw-r--r-- | src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm index 0bcc77af5..0b30df1df 100644 --- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm +++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm @@ -187,7 +187,7 @@ static NSOpenGLContext *create_GLcontext_for_window( if (shared_ctx && !context) context = [[NSOpenGLContext alloc] initWithFormat:pixelformat shareContext:nil]; if (context) { NSView *view = [fl_xid(window) contentView]; - if (fl_mac_os_version >= 100700) { + if (view && fl_mac_os_version >= 100700) { //replaces [view setWantsBestResolutionOpenGLSurface:YES] without compiler warning typedef void (*bestResolutionIMP)(id, SEL, BOOL); static bestResolutionIMP addr = (bestResolutionIMP)[NSView instanceMethodForSelector:@selector(setWantsBestResolutionOpenGLSurface:)]; |
