mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 11:29:50 +02:00
Return early from AvatarTransformNode and similar when getTransform fails
This commit is contained in:
parent
e8ea95e375
commit
3f7a7fb11a
3 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ Transform OverlayTransformNode::getTransform() {
|
||||||
bool success;
|
bool success;
|
||||||
Transform jointWorldTransform = overlay->getTransform(_jointIndex, success);
|
Transform jointWorldTransform = overlay->getTransform(_jointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
jointWorldTransform = Transform();
|
return Transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
jointWorldTransform.setScale(overlay->getBounds().getScale());
|
jointWorldTransform.setScale(overlay->getBounds().getScale());
|
||||||
|
|
|
@ -21,7 +21,7 @@ Transform AvatarTransformNode::getTransform() {
|
||||||
bool success;
|
bool success;
|
||||||
Transform jointWorldTransform = avatar->getTransform(_jointIndex, success);
|
Transform jointWorldTransform = avatar->getTransform(_jointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
jointWorldTransform = Transform();
|
return Transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
jointWorldTransform.setScale(avatar->scaleForChildren());
|
jointWorldTransform.setScale(avatar->scaleForChildren());
|
||||||
|
|
|
@ -21,7 +21,7 @@ Transform EntityTransformNode::getTransform() {
|
||||||
bool success;
|
bool success;
|
||||||
Transform jointWorldTransform = entity->getTransform(_jointIndex, success);
|
Transform jointWorldTransform = entity->getTransform(_jointIndex, success);
|
||||||
if (!success) {
|
if (!success) {
|
||||||
jointWorldTransform = Transform();
|
return Transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
jointWorldTransform.setScale(entity->getScaledDimensions());
|
jointWorldTransform.setScale(entity->getScaledDimensions());
|
||||||
|
|
Loading…
Reference in a new issue