summaryrefslogtreecommitdiff
path: root/platform/linuxbsd
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-14 13:33:36 +0100
committerGitHub <noreply@github.com>2020-11-14 13:33:36 +0100
commitdd5485142f2d2d84b98483ea41bc36e03c4a16b7 (patch)
treedf20f02cc64773734086449546ebee063d8ce8ea /platform/linuxbsd
parentffbaf715502f9e8af0a207d52b9c2274a4d930d8 (diff)
parentf09a37a8d5af37c9d7a450a7206ea57709b81db0 (diff)
Merge pull request #43531 from bruvzg/x11_fix_vlk_init_crash
Fixes crash if Vulkan presentation surface is not available.
Diffstat (limited to 'platform/linuxbsd')
-rw-r--r--platform/linuxbsd/display_server_x11.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/platform/linuxbsd/display_server_x11.cpp b/platform/linuxbsd/display_server_x11.cpp
index e04dde7969..bb8086d3a3 100644
--- a/platform/linuxbsd/display_server_x11.cpp
+++ b/platform/linuxbsd/display_server_x11.cpp
@@ -3852,6 +3852,10 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
(screen_get_size(0).width - p_resolution.width) / 2,
(screen_get_size(0).height - p_resolution.height) / 2);
WindowID main_window = _create_window(p_mode, p_flags, Rect2i(window_position, p_resolution));
+ if (main_window == INVALID_WINDOW_ID) {
+ r_error = ERR_CANT_CREATE;
+ return;
+ }
for (int i = 0; i < WINDOW_FLAG_MAX; i++) {
if (p_flags & (1 << i)) {
window_set_flag(WindowFlags(i), true, main_window);