Mercurial > hg > openttd
changeset 18121:bbd08e01a885 draft
(svn r22946) -Fix [FS#4781]: [NewGRF] Crash when accessing vehicle var 44 for a non-front aircraft.
author | frosch <frosch@openttd.org> |
---|---|
date | Mon, 19 Sep 2011 19:22:18 +0000 |
parents | 31b39ad60ab7 |
children | ed51ea71bb08 |
files | src/newgrf_engine.cpp |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -596,7 +596,7 @@ 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();