summaryrefslogtreecommitdiff
path: root/src/station.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station.cpp')
-rw-r--r--src/station.cpp3
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);
}