mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r19298) -Fix: [NewGRF] segfault when station vars 0xF2/0xF3 is accessed when there is no truck/bus stop
This commit is contained in:
parent
5152cb1a26
commit
fe5bb036a0
|
@ -525,8 +525,8 @@ uint32 Station::GetNewGRFVariable(const ResolverObject *object, byte variable, b
|
|||
|
||||
case 0x8A: return this->had_vehicle_of_type;
|
||||
case 0xF1: return this->airport_type;
|
||||
case 0xF2: return this->truck_stops->status;
|
||||
case 0xF3: return this->bus_stops->status;
|
||||
case 0xF2: return (this->truck_stops != NULL) ? this->truck_stops->status : 0;
|
||||
case 0xF3: return (this->bus_stops != NULL) ? this->bus_stops->status : 0;
|
||||
case 0xF6: return this->airport_flags;
|
||||
case 0xF7: return GB(this->airport_flags, 8, 8);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue