From 9ccc416e80288253b9bdfa232092b101080003a1 Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Wed, 22 Nov 2017 16:34:56 -0800 Subject: [PATCH] avoid a crash during domain change --- libraries/entities/src/EntityItem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/entities/src/EntityItem.cpp b/libraries/entities/src/EntityItem.cpp index 48420c95c2..4f2b290635 100644 --- a/libraries/entities/src/EntityItem.cpp +++ b/libraries/entities/src/EntityItem.cpp @@ -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);