avoid a crash during domain change

This commit is contained in:
Seth Alves 2017-11-22 16:34:56 -08:00
parent e20555bf38
commit 9ccc416e80

View file

@ -1602,7 +1602,7 @@ void EntityItem::setParentID(const QUuid& value) {
QUuid oldParentID = getParentID();
if (oldParentID != value) {
EntityTreePointer tree = getTree();
if (!oldParentID.isNull()) {
if (tree && !oldParentID.isNull()) {
tree->removeFromChildrenOfAvatars(getThisPointer());
}
SpatiallyNestable::setParentID(value);