summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorerorcun <erayorcunus@gmail.com>2020-03-17 18:41:59 +0100
committerGitHub <noreply@github.com>2020-03-17 18:41:59 +0100
commit7aa5d16b534a1a23578ceba1b6436a774312237e (patch)
tree95002cea3014b2c5868cb496843d511c31ee0199 /src/control/Script.cpp
parentMerge pull request #345 from whampson/save-stuff (diff)
parentMerge remote-tracking branch 'upstream/master' (diff)
downloadre3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar.gz
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar.bz2
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar.lz
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar.xz
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.tar.zst
re3-7aa5d16b534a1a23578ceba1b6436a774312237e.zip
Diffstat (limited to 'src/control/Script.cpp')
-rw-r--r--src/control/Script.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 4a6b5376..75c594cf 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -8106,6 +8106,8 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
if (model != -1)
break;
model = CStreaming::ms_vehiclesLoaded[index];
+ if (model == -1)
+ continue;
// desperatly want to believe this was inlined :|
CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model);
assert(pInfo->m_type == MITYPE_VEHICLE);