diff options
author | rubidium <rubidium@openttd.org> | 2007-08-18 22:56:58 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-18 22:56:58 +0000 |
commit | 3686455868f997012c01a420f14d8885046d9104 (patch) | |
tree | 0ff868a6e8560a33c2f7d804ed8f5174f354033d | |
parent | 7a083c621659c22ff71b099f92b8e1df3c73d758 (diff) | |
download | openttd-3686455868f997012c01a420f14d8885046d9104.tar.xz |
(svn r10931) -Fix [FS#1131]: when a station was destroyed and a vehicle was still loading, changing the current order of the loading vehicle caused a crash. This could happen with removing docks and oil rigs.
-rw-r--r-- | src/station.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/station.cpp b/src/station.cpp index fab0395b7..16723fc68 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -69,6 +69,10 @@ Station::~Station() if (CleaningPool()) return; + while (!loading_vehicles.empty()) { + loading_vehicles.front()->LeaveStation(); + } + MarkDirty(); RebuildStationLists(); InvalidateWindowClasses(WC_STATION_LIST); |