# HG changeset patch # User fonsinchen # Date 2013-08-11 10:59:47 # Node ID d88d6338880e2e2263c84b392aca91807217960a # Parent 6206c89a5229122b448cccb6fdbb88c9e8c4b22f (svn r25717) -Fix: check for type of order before checking for refit type diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- 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();