1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-29 01:19:11 +00:00

(svn r22946) -Fix [FS#4781]: [NewGRF] Crash when accessing vehicle var 44 for a non-front aircraft.

This commit is contained in:
frosch
2011-09-19 19:22:18 +00:00
parent 64dc7f5ee8
commit 427dd736ae

View File

@@ -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();