summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/VehicleModelInfo.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-08-24 17:21:45 +0200
committeraap <aap@papnet.eu>2020-08-24 17:21:45 +0200
commit56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89 (patch)
treee37523536524da22b942cbad973d6545af599164 /src/modelinfo/VehicleModelInfo.cpp
parentfinished sprites (diff)
downloadre3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar.gz
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar.bz2
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar.lz
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar.xz
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.tar.zst
re3-56b80cb0ab37ff6e7d4f58bf75c9e096d854ef89.zip
Diffstat (limited to 'src/modelinfo/VehicleModelInfo.cpp')
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index 68673458..5d69a921 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -211,7 +211,7 @@ CVehicleModelInfo::CreateInstance(void)
clumpframe = RpClumpGetFrame(clump);
comp1 = ChooseComponent();
- if(comp1 != -1){
+ if(comp1 != -1 && m_comps[comp1]){
atomic = RpAtomicClone(m_comps[comp1]);
f = RwFrameCreate();
RwFrameTransform(f,
@@ -224,7 +224,7 @@ CVehicleModelInfo::CreateInstance(void)
ms_compsUsed[0] = comp1;
comp2 = ChooseSecondComponent();
- if(comp2 != -1){
+ if(comp2 != -1 && m_comps[comp2]){
atomic = RpAtomicClone(m_comps[comp2]);
f = RwFrameCreate();
RwFrameTransform(f,