(svn r26286) -Fix: Thoroughly erase dead flows.

This commit is contained in:
fonsinchen
2014-01-29 19:55:29 +00:00
parent 5b464bf9fe
commit b31a1119fb
3 changed files with 24 additions and 4 deletions

View File

@@ -99,8 +99,9 @@ Station::~Station()
if (lg == NULL) continue;
for (NodeID node = 0; node < lg->Size(); ++node) {
Station *st = Station::Get((*lg)[node].Station());
st->goods[c].flows.erase(this->index);
if ((*lg)[node][this->goods[c].node].LastUpdate() != INVALID_DATE) {
Station *st = Station::Get((*lg)[node].Station());
st->goods[c].flows.DeleteFlows(this->index);
RerouteCargo(st, c, this->index, st->index);
}