mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-13 17:49:10 +00:00
Codechange: introduce GetMainWindow() to properly account for nullptr checks
Some nullptr checks have been removed as they were not triggered with nullptr with the null video driver and in dedicated server mode.
This commit is contained in:
@@ -2517,6 +2517,6 @@ void ShowNetworkAskRelay(const std::string &server_connection_string, const std:
|
||||
{
|
||||
CloseWindowByClass(WC_NETWORK_ASK_RELAY);
|
||||
|
||||
Window *parent = FindWindowById(WC_MAIN_WINDOW, 0);
|
||||
Window *parent = GetMainWindow();
|
||||
new NetworkAskRelayWindow(&_network_ask_relay_desc, parent, server_connection_string, relay_connection_string, token);
|
||||
}
|
||||
|
Reference in New Issue
Block a user