Merge pull request #62767 from bruvzg/glman_check
Check if GL manager exist to prevent crash when using multithreaded renderer with Vulkan.
This commit is contained in:
commit
398ab31a6b
|
@ -4175,13 +4175,17 @@ void DisplayServerX11::process_events() {
|
||||||
|
|
||||||
void DisplayServerX11::release_rendering_thread() {
|
void DisplayServerX11::release_rendering_thread() {
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
gl_manager->release_current();
|
if (gl_manager) {
|
||||||
|
gl_manager->release_current();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void DisplayServerX11::make_rendering_thread() {
|
void DisplayServerX11::make_rendering_thread() {
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
gl_manager->make_current();
|
if (gl_manager) {
|
||||||
|
gl_manager->make_current();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2920,7 +2920,9 @@ void DisplayServerOSX::make_rendering_thread() {
|
||||||
|
|
||||||
void DisplayServerOSX::swap_buffers() {
|
void DisplayServerOSX::swap_buffers() {
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
gl_manager->swap_buffers();
|
if (gl_manager) {
|
||||||
|
gl_manager->swap_buffers();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -656,7 +656,9 @@ void DisplayServerWindows::delete_sub_window(WindowID p_window) {
|
||||||
|
|
||||||
void DisplayServerWindows::gl_window_make_current(DisplayServer::WindowID p_window_id) {
|
void DisplayServerWindows::gl_window_make_current(DisplayServer::WindowID p_window_id) {
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
gl_manager->window_make_current(p_window_id);
|
if (gl_manager) {
|
||||||
|
gl_manager->window_make_current(p_window_id);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue