mirror of
https://github.com/lubosz/overte.git
synced 2025-08-12 21:07:53 +02:00
avoid possible crash
This commit is contained in:
parent
f33e5ba5ae
commit
c6f44234f8
1 changed files with 3 additions and 1 deletions
|
@ -5309,9 +5309,11 @@ void MyAvatar::releaseGrab(const QUuid& grabID) {
|
||||||
grab->setReleased(true);
|
grab->setReleased(true);
|
||||||
bool success;
|
bool success;
|
||||||
SpatiallyNestablePointer target = SpatiallyNestable::findByID(grab->getTargetID(), success);
|
SpatiallyNestablePointer target = SpatiallyNestable::findByID(grab->getTargetID(), success);
|
||||||
|
if (target) {
|
||||||
target->disableGrab(grab);
|
target->disableGrab(grab);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_avatarGrabData.remove(grabID)) {
|
if (_avatarGrabData.remove(grabID)) {
|
||||||
_grabsToDelete.push_back(grabID);
|
_grabsToDelete.push_back(grabID);
|
||||||
|
|
Loading…
Reference in a new issue