1
0
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:
Rubidium
2023-01-06 23:24:38 +01:00
committed by rubidium42
parent 9c70c38c5e
commit bcfe0fb076
16 changed files with 47 additions and 40 deletions

View File

@@ -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);
}