From 560bae8c915f78aeaeed4d3e941827a841b6bf53 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 23 Nov 2011 20:36:27 +0000 Subject: [PATCH] (svn r23312) -Fix [FS#4849]: assertion could be triggered in case a station was removed just after a vehicle delivered cargo to it --- src/station_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 177d2c7861..b772da079a 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -3027,8 +3027,8 @@ void TriggerWatchedCargoCallbacks(Station *st) */ static bool StationHandleBigTick(BaseStation *st) { - if (!st->IsInUse() && ++st->delete_ctr >= 8) { - delete st; + if (!st->IsInUse()) { + if (++st->delete_ctr >= 8) delete st; return false; }