diff options
author | truelight <truelight@openttd.org> | 2004-08-20 16:17:13 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2004-08-20 16:17:13 +0000 |
commit | b43e1e4e4301eb7df7162c2137f4a7698712423e (patch) | |
tree | fac00c95ba59d0d492cec36e89047870489d1247 | |
parent | c55eda92f8c959d1c35367b06b1d23f425884afa (diff) | |
download | openttd-b43e1e4e4301eb7df7162c2137f4a7698712423e.tar.xz |
(svn r94) -Fix: AI crash bug (blathijs)
-rw-r--r-- | ai_new.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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++;
}
- };
+ }
}
}
|