Merge pull request #98405 from SilverCreekEntertainment/fix-create-window-failed-message-box

Fix window exiting with no message to user if _create_window fails
This commit is contained in:
Clay John 2024-10-23 12:56:12 -07:00 committed by GitHub
commit 3dbef70d17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6400,7 +6400,10 @@ DisplayServerWindows::DisplayServerWindows(const String &p_rendering_driver, Win
}
WindowID main_window = _create_window(p_mode, p_vsync_mode, p_flags, Rect2i(window_position, p_resolution), false, INVALID_WINDOW_ID);
ERR_FAIL_COND_MSG(main_window == INVALID_WINDOW_ID, "Failed to create main window.");
if (main_window == INVALID_WINDOW_ID) {
r_error = ERR_UNAVAILABLE;
ERR_FAIL_MSG("Failed to create main window.");
}
joypad = new JoypadWindows(&windows[MAIN_WINDOW_ID].hWnd);