Fix gl_manager nullptr crash
Add a nullptr-check, before accessing gl_manager
This commit is contained in:
parent
c17f17eb98
commit
ed5c9a07d7
1 changed files with 4 additions and 1 deletions
|
@ -1319,7 +1319,10 @@ int64_t DisplayServerX11::window_get_native_handle(HandleType p_handle_type, Win
|
||||||
}
|
}
|
||||||
#ifdef GLES3_ENABLED
|
#ifdef GLES3_ENABLED
|
||||||
case OPENGL_CONTEXT: {
|
case OPENGL_CONTEXT: {
|
||||||
return (int64_t)gl_manager->get_glx_context(p_window);
|
if (gl_manager) {
|
||||||
|
return (int64_t)gl_manager->get_glx_context(p_window);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
default: {
|
default: {
|
||||||
|
|
Loading…
Reference in a new issue