Commit 2b91781d authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Looking for bug in PoolObject (portals are referenced at core reset, but not used ...)

parent 99d62c44
...@@ -231,8 +231,10 @@ CVAPoolObject::~CVAPoolObject() { ...@@ -231,8 +231,10 @@ CVAPoolObject::~CVAPoolObject() {
} }
int CVAPoolObject::RemoveReference() const { int CVAPoolObject::RemoveReference() const
assert ( GetNumReferences() >= 1 ); {
const int iNumReferences = GetNumReferences();
assert( iNumReferences >= 1 );
int iRefs = CVAReferenceableObject::RemoveReference(); int iRefs = CVAReferenceableObject::RemoveReference();
if ((iRefs == 0) && m_pParentPool) m_pParentPool->ReleaseObject( const_cast<CVAPoolObject*>(this) ); if ((iRefs == 0) && m_pParentPool) m_pParentPool->ReleaseObject( const_cast<CVAPoolObject*>(this) );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment