You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Added missing null checks for gl_manager in MacOS and Windows display servers
This commit is contained in:
@@ -2945,7 +2945,10 @@ int64_t DisplayServerMacOS::window_get_native_handle(HandleType p_handle_type, W
|
|||||||
}
|
}
|
||||||
#ifdef GLES3_ENABLED
|
#ifdef GLES3_ENABLED
|
||||||
case OPENGL_CONTEXT: {
|
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
|
#endif
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
@@ -743,10 +743,16 @@ int64_t DisplayServerWindows::window_get_native_handle(HandleType p_handle_type,
|
|||||||
}
|
}
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
case WINDOW_VIEW: {
|
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: {
|
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
|
#endif
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
Reference in New Issue
Block a user