diff options
author | David Snopek <dsnopek@gmail.com> | 2022-11-13 07:06:26 -0600 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2022-11-13 07:06:26 -0600 |
commit | 4c8409c0fe2a06dd7fa0ff0fde428298b4b18e2d (patch) | |
tree | b81c6d3aac377ccefbfcc8c681f95612ec82db4c /platform/windows | |
parent | c17f17eb98188a7134c85bdbdf0123127c462046 (diff) |
Added missing null checks for gl_manager in MacOS and Windows display servers
Diffstat (limited to 'platform/windows')
-rw-r--r-- | platform/windows/display_server_windows.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/windows/display_server_windows.cpp b/platform/windows/display_server_windows.cpp index 2c8058fdc5..ec6a8d5579 100644 --- a/platform/windows/display_server_windows.cpp +++ b/platform/windows/display_server_windows.cpp @@ -743,10 +743,16 @@ int64_t DisplayServerWindows::window_get_native_handle(HandleType p_handle_type, } #if defined(GLES3_ENABLED) case WINDOW_VIEW: { - return (int64_t)gl_manager->get_hdc(p_window); + if (gl_manager) { + return (int64_t)gl_manager->get_hdc(p_window); + } + return 0; } case OPENGL_CONTEXT: { - return (int64_t)gl_manager->get_hglrc(p_window); + if (gl_manager) { + return (int64_t)gl_manager->get_hglrc(p_window); + } + return 0; } #endif default: { |