mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-10 20:58:37 +02:00
possible fix for crash when grabbing bubblewand
This commit is contained in:
parent
0bf276efa5
commit
ec9f1e0754
1 changed files with 5 additions and 2 deletions
|
@ -206,10 +206,13 @@ QUuid EntityScriptingInterface::editEntity(QUuid id, const EntityItemProperties&
|
||||||
// All of parentID, parentJointIndex, position, rotation are needed to make sense of any of them.
|
// All of parentID, parentJointIndex, position, rotation are needed to make sense of any of them.
|
||||||
// If any of these changed, pull any missing properties from the entity.
|
// If any of these changed, pull any missing properties from the entity.
|
||||||
EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID);
|
EntityItemPointer entity = _entityTree->findEntityByEntityItemID(entityID);
|
||||||
if (entity && !scriptSideProperties.parentIDChanged()) {
|
if (!entity) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!scriptSideProperties.parentIDChanged()) {
|
||||||
properties.setParentID(entity->getParentID());
|
properties.setParentID(entity->getParentID());
|
||||||
}
|
}
|
||||||
if (entity && !scriptSideProperties.parentJointIndexChanged()) {
|
if (!scriptSideProperties.parentJointIndexChanged()) {
|
||||||
properties.setParentJointIndex(entity->getParentJointIndex());
|
properties.setParentJointIndex(entity->getParentJointIndex());
|
||||||
}
|
}
|
||||||
if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) {
|
if (!scriptSideProperties.localPositionChanged() && !scriptSideProperties.positionChanged()) {
|
||||||
|
|
Loading…
Reference in a new issue