Merge pull request #11873 from sethalves/fix-wearable-domain-change-crash

avoid a crash during domain change while wearing something
This commit is contained in:
Brad Hefta-Gaub 2017-11-27 13:01:48 -08:00 committed by GitHub
commit 6d6ac0a5a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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);