From b43e1e4e4301eb7df7162c2137f4a7698712423e Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 20 Aug 2004 16:17:13 +0000 Subject: (svn r94) -Fix: AI crash bug (blathijs) --- ai_new.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ai_new.c') diff --git a/ai_new.c b/ai_new.c index 1a79a50bf..df4cad4b7 100644 --- a/ai_new.c +++ b/ai_new.c @@ -487,12 +487,13 @@ static bool AiNew_CheckVehicleStation(Player *p, Station *st) { FOR_ALL_VEHICLES(v) { if (v->owner == _current_player) { sched = v->schedule_ptr; + if (sched == NULL) continue; while ((ord=*sched++) != 0) { if ((ord & OT_MASK) == OT_GOTO_STATION && DEREF_STATION(ord >> 8) == st) { // This vehicle has this city in his list count++; } - }; + } } } -- cgit v1.2.3-54-g00ecf