Merge pull request #4084 from ZappoMan/master

Fix Philip's entity delete crash
This commit is contained in:
Philip Rosedale 2015-01-11 12:46:46 -08:00
commit 343ee4ea67

View file

@ -92,7 +92,8 @@ bool DeleteEntityOperator::preRecursion(OctreeElement* element) {
// and we can stop searching.
if (entityTreeElement == details.containingElement) {
EntityItem* theEntity = details.entity;
assert(entityTreeElement->removeEntityItem(theEntity)); // remove it from the element
bool entityDeleted = entityTreeElement->removeEntityItem(theEntity); // remove it from the element
assert(entityDeleted);
_tree->setContainingElement(details.entity->getEntityItemID(), NULL); // update or id to element lookup
_foundCount++;
}