diff options
author | aap <aap@papnet.eu> | 2021-01-25 10:45:38 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2021-01-25 10:45:38 +0100 |
commit | a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb (patch) | |
tree | 456be2ca0ff5297734d769c89646b52841bfc2df /src/modelinfo/SimpleModelInfo.cpp | |
parent | fix some breakage (diff) | |
download | re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar.gz re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar.bz2 re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar.lz re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar.xz re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.tar.zst re3-a4c5b87b90794fa9bfa1884aea314df0fb8ac9eb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/modelinfo/SimpleModelInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modelinfo/SimpleModelInfo.cpp b/src/modelinfo/SimpleModelInfo.cpp index 1199c200..dee483f9 100644 --- a/src/modelinfo/SimpleModelInfo.cpp +++ b/src/modelinfo/SimpleModelInfo.cpp @@ -50,7 +50,7 @@ RwObject* CSimpleModelInfo::CreateInstance(void) { RpAtomic *atomic; - if(m_atomics && m_atomics[0] == nil) + if(m_atomics == nil || m_atomics[0] == nil) return nil; atomic = RpAtomicClone(m_atomics[0]); RpAtomicSetFrame(atomic, RwFrameCreate()); @@ -64,7 +64,7 @@ CSimpleModelInfo::CreateInstance(RwMatrix *matrix) RpAtomic *atomic; RwFrame *frame; - if(m_atomics && m_atomics[0] == nil) + if(m_atomics == nil || m_atomics[0] == nil) return nil; atomic = RpAtomicClone(m_atomics[0]); frame = RwFrameCreate(); @@ -205,6 +205,8 @@ CSimpleModelInfo::GetAtomicFromDistance(float dist) { int i; i = 0; +// HACk until we figure out what's going on +if(m_atomics == nil) return nil; if(m_isDamaged) i = m_firstDamaged; for(; i < m_numAtomics; i++) |