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 | fda1c9d34a3f6d8c3edd103587e28758d703221b (patch) | |
tree | 0ff868a6e8560a33c2f7d804ed8f5174f354033d | |
parent | b8fb51432110c6e477cee4373e20549a32de4951 (diff) | |
download | openttd-fda1c9d34a3f6d8c3edd103587e28758d703221b.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); |