(svn r25910) -Fix: Guard against empty FlowStats in a few more places.

This commit is contained in:
fonsinchen
2013-10-23 19:04:06 +00:00
parent 3ebe7e3ef9
commit 49d2cd4049
2 changed files with 5 additions and 1 deletions

View File

@@ -478,7 +478,7 @@ bool VehicleCargoList::Stage(bool accepted, StationID current_station, StationID
FlowStat new_shares = flow_it->second;
new_shares.ChangeShare(current_station, INT_MIN);
StationIDStack excluded = next_station;
while (!excluded.IsEmpty()) {
while (!excluded.IsEmpty() && !new_shares.GetShares()->empty()) {
new_shares.ChangeShare(excluded.Pop(), INT_MIN);
}
if (new_shares.GetShares()->empty()) {