summaryrefslogtreecommitdiffstats
path: root/src/control/Script.cpp
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-15 16:47:21 +0100
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-15 16:47:21 +0100
commit152d8c2f40e2f2df68ecc7f91304bd1edc8949ec (patch)
treedd66353353727318535835d92c83bfc7f29e4dc3 /src/control/Script.cpp
parentmore utils (diff)
downloadre3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar.gz
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar.bz2
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar.lz
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar.xz
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.tar.zst
re3-152d8c2f40e2f2df68ecc7f91304bd1edc8949ec.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);