forked from teamnwah/openmw-tes3coop
Fix use of UnrefQueue in removeObject
This commit is contained in:
parent
3019d70986
commit
6615330430
1 changed files with 3 additions and 3 deletions
|
@ -112,12 +112,12 @@ bool Objects::removeObject (const MWWorld::Ptr& ptr)
|
|||
PtrAnimationMap::iterator iter = mObjects.find(ptr);
|
||||
if(iter != mObjects.end())
|
||||
{
|
||||
if (mUnrefQueue.get())
|
||||
mUnrefQueue->push(iter->second->getObjectRoot());
|
||||
|
||||
delete iter->second;
|
||||
mObjects.erase(iter);
|
||||
|
||||
if (mUnrefQueue.get())
|
||||
mUnrefQueue->push(ptr.getRefData().getBaseNode());
|
||||
|
||||
ptr.getRefData().getBaseNode()->getParent(0)->removeChild(ptr.getRefData().getBaseNode());
|
||||
|
||||
ptr.getRefData().setBaseNode(NULL);
|
||||
|
|
Loading…
Reference in a new issue