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:
@@ -157,7 +157,7 @@ void FixTitleGameZoom(int zoom_adjust)
|
||||
{
|
||||
if (_game_mode != GM_MENU) return;
|
||||
|
||||
Viewport *vp = FindWindowByClass(WC_MAIN_WINDOW)->viewport;
|
||||
Viewport *vp = GetMainWindow()->viewport;
|
||||
|
||||
/* Adjust the zoom in/out.
|
||||
* Can't simply add, since operator+ is not defined on the ZoomLevel type. */
|
||||
|
Reference in New Issue
Block a user