mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-20 04:59:11 +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:
@@ -222,7 +222,7 @@ struct SelectGameWindow : public Window {
|
||||
}
|
||||
|
||||
IntroGameViewportCommand &vc = intro_viewport_commands[this->cur_viewport_command_index];
|
||||
Window *mw = FindWindowByClass(WC_MAIN_WINDOW);
|
||||
Window *mw = GetMainWindow();
|
||||
Viewport *vp = mw->viewport;
|
||||
|
||||
/* Early exit if the current command hasn't elapsed and isn't animated. */
|
||||
|
Reference in New Issue
Block a user