1
0
Fork 0

(svn r26067) -Fix: possible NULL dereference when getting NewGRF version

release/1.4
rubidium 2013-11-23 18:08:15 +00:00
parent d18852170b
commit c035a9531b
1 changed files with 1 additions and 1 deletions

View File

@ -6578,7 +6578,7 @@ static void ParamSet(ByteReader *buf)
/* Disable the read GRF if it is a static NewGRF. */
DisableStaticNewGRFInfluencingNonStaticNewGRFs(c);
src1 = 0;
} else if (file == NULL || (c != NULL && c->status == GCS_DISABLED)) {
} else if (file == NULL || c == NULL || c->status == GCS_DISABLED) {
src1 = 0;
} else if (src1 == 0xFE) {
src1 = c->version;