summaryrefslogtreecommitdiffstats
path: root/src/entities/Dummy.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-05-19 13:26:21 +0200
committerGitHub <noreply@github.com>2020-05-19 13:26:21 +0200
commit6b0b984909fe7ff268e978938e65a91d9bfd7d8c (patch)
tree71bf0f31ca1922c89b7996effe6ca87ef4c3a749 /src/entities/Dummy.cpp
parentHandlingMgr (diff)
parentMerge remote-tracking branch 'upstream/miami' into miami (diff)
downloadre3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar.gz
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar.bz2
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar.lz
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar.xz
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.tar.zst
re3-6b0b984909fe7ff268e978938e65a91d9bfd7d8c.zip
Diffstat (limited to 'src/entities/Dummy.cpp')
-rw-r--r--src/entities/Dummy.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/entities/Dummy.cpp b/src/entities/Dummy.cpp
index 8a4bfd5f..92b69761 100644
--- a/src/entities/Dummy.cpp
+++ b/src/entities/Dummy.cpp
@@ -50,3 +50,18 @@ CDummy::Remove(void)
m_entryInfoList.DeleteNode(node);
}
}
+
+bool
+IsDummyPointerValid(CDummy* pDummy)
+{
+ if (!pDummy)
+ return false;
+ int index = CPools::GetDummyPool()->GetJustIndex(pDummy);
+#ifdef FIX_BUGS
+ if (index < 0 || index >= CPools::GetDummyPool()->GetSize())
+#else
+ if (index < 0 || index > CPools::GetDummyPool()->GetSize())
+#endif
+ return false;
+ return pDummy->m_entryInfoList.first;
+}