Skip to content

Commit

Permalink
Merge pull request godotengine#98405 from SilverCreekEntertainment/fi…
Browse files Browse the repository at this point in the history
…x-create-window-failed-message-box

Fix window exiting with no message to user if _create_window fails
  • Loading branch information
clayjohn authored Oct 23, 2024
2 parents 533c616 + 403e53e commit 3dbef70
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion platform/windows/display_server_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 3dbef70

Please sign in to comment.