From cb4bde78b177fadac3d6204c7294d55b742f8c96 Mon Sep 17 00:00:00 2001 From: fonsinchen Date: Sun, 11 Aug 2013 10:59:47 +0000 Subject: [PATCH] (svn r25717) -Fix: check for type of order before checking for refit type --- src/vehicle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index a57834ec49..7d9a67924a 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -2161,7 +2161,8 @@ void Vehicle::RefreshNextHopsStats() * deadlocks due to vehicles waiting for cargo that isn't being routed, * yet. That situation will not occur if the vehicle is actually * carrying a different cargo in the end. */ - if (next->IsRefit() && !next->IsAutoRefit()) { + if ((next->IsType(OT_GOTO_DEPOT) || next->IsType(OT_GOTO_STATION)) && + next->IsRefit() && !next->IsAutoRefit()) { was_refit = true; CargoID new_cid = next->GetRefitCargo(); RefitList::iterator refit_it = refit_capacities.begin();