diff options
author | rubidium <rubidium@openttd.org> | 2013-11-23 18:08:15 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2013-11-23 18:08:15 +0000 |
commit | c035a9531bc90368f35eba671c463956c7886075 (patch) | |
tree | e19e9b58b11d91a50191bdc75630f7b140f56a21 /src | |
parent | d18852170b99e6cd20a23ef7305cecd7b741a808 (diff) | |
download | openttd-c035a9531bc90368f35eba671c463956c7886075.tar.xz |
(svn r26067) -Fix: possible NULL dereference when getting NewGRF version
Diffstat (limited to 'src')
-rw-r--r-- | src/newgrf.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 36cdadf68..9725d9513 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -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; |