mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-04 06:00:15 +00:00
(svn r22946) -Fix [FS#4781]: [NewGRF] Crash when accessing vehicle var 44 for a non-front aircraft.
This commit is contained in:
parent
64dc7f5ee8
commit
427dd736ae
@ -596,7 +596,7 @@ static uint32 VehicleGetVariable(const ResolverObject *object, byte variable, by
|
||||
return v->grf_cache.company_information;
|
||||
|
||||
case 0x44: // Aircraft information
|
||||
if (v->type != VEH_AIRCRAFT) return UINT_MAX;
|
||||
if (v->type != VEH_AIRCRAFT || !Aircraft::From(v)->IsNormalAircraft()) return UINT_MAX;
|
||||
|
||||
{
|
||||
const Vehicle *w = v->Next();
|
||||
|
Loading…
Reference in New Issue
Block a user