This is not a very useful state, but it's nice to not crash. Some parts of the game don't (yet) check for cargo types being redefined, that is out-of-scope here.
This commit is contained in:
@@ -501,7 +501,8 @@ NWidgetBase *MakeCargoesLegendLinkGraphGUI(int *biggest_index)
|
||||
spc->SetResize(0, 0);
|
||||
col->Add(spc);
|
||||
}
|
||||
panel->Add(col);
|
||||
/* If there are no cargo specs defined, then col won't have been created so don't add it. */
|
||||
if (col != nullptr) panel->Add(col);
|
||||
*biggest_index = WID_LGL_CARGO_LAST;
|
||||
return panel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user