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:
@@ -553,7 +553,7 @@ LinkGraphLegendWindow::LinkGraphLegendWindow(WindowDesc *desc, int window_number
|
||||
{
|
||||
this->InitNested(window_number);
|
||||
this->InvalidateData(0);
|
||||
this->SetOverlay(FindWindowById(WC_MAIN_WINDOW, 0)->viewport->overlay);
|
||||
this->SetOverlay(GetMainWindow()->viewport->overlay);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user