You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Fix gl_manager nullptr crash
Add a nullptr-check, before accessing gl_manager
This commit is contained in:
@@ -1319,8 +1319,11 @@ int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, Win
|
|||||||
}
|
}
|
||||||
#ifdef GLES3_ENABLED
|
#ifdef GLES3_ENABLED
|
||||||
case OPENGL_CONTEXT: {
|
case OPENGL_CONTEXT: {
|
||||||
|
if (gl_manager) {
|
||||||
return (int64_t)gl_manager->get_glx_context(p_window);
|
return (int64_t)gl_manager->get_glx_context(p_window);
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
default: {
|
default: {
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user