diff options
author | fonsinchen <fonsinchen@openttd.org> | 2014-01-29 19:55:29 +0000 |
---|---|---|
committer | fonsinchen <fonsinchen@openttd.org> | 2014-01-29 19:55:29 +0000 |
commit | 91407b924ea47efdfe3a17fad5513189d5605288 (patch) | |
tree | 26ab6e02883efd83b884c177e65a1e4eab94320b /src/station.cpp | |
parent | e4a4f2c1ddbc67aa9d5fa7380a8eb2a10b619958 (diff) | |
download | openttd-91407b924ea47efdfe3a17fad5513189d5605288.tar.xz |
(svn r26286) -Fix: Thoroughly erase dead flows.
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/station.cpp b/src/station.cpp index 0c7af914b..30723cc7b 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -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); } |