summaryrefslogtreecommitdiff
path: root/platform/macos
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2022-11-13 07:06:26 -0600
committerDavid Snopek <dsnopek@gmail.com>2022-11-13 07:06:26 -0600
commit4c8409c0fe2a06dd7fa0ff0fde428298b4b18e2d (patch)
treeb81c6d3aac377ccefbfcc8c681f95612ec82db4c /platform/macos
parentc17f17eb98188a7134c85bdbdf0123127c462046 (diff)
Added missing null checks for gl_manager in MacOS and Windows display servers
Diffstat (limited to 'platform/macos')
-rw-r--r--platform/macos/display_server_macos.mm5
1 files changed, 4 insertions, 1 deletions
diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm
index 8b596379a0..e8a56c984c 100644
--- a/platform/macos/display_server_macos.mm
+++ b/platform/macos/display_server_macos.mm
@@ -2945,7 +2945,10 @@ int64_t DisplayServerMacOS::window_get_native_handle(HandleType p_handle_type, W
}
#ifdef GLES3_ENABLED
case OPENGL_CONTEXT: {
- return (int64_t)gl_manager->get_context(p_window);
+ if (gl_manager) {
+ return (int64_t)gl_manager->get_context(p_window);
+ }
+ return 0;
}
#endif
default: {