mirror of
https://github.com/godotengine/godot.git
synced 2025-04-07 00:44:24 +08:00
Fix window exiting with no message to user if _create_window fails
This commit is contained in:
parent
b3bcb2dc14
commit
403e53e1d3
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user