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.
(cherry picked from commit bbd64bbe2b
)
This commit is contained in:

committed by
Jonathan G Rennison

parent
0b226865d5
commit
480e03360b
@@ -679,7 +679,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