From 3686455868f997012c01a420f14d8885046d9104 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 18 Aug 2007 22:56:58 +0000 Subject: (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. --- src/station.cpp | 4 ++++ 1 file changed, 4 insertions(+) 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); -- cgit v1.2.3-54-g00ecf