Return early from AvatarTransformNode and similar when getTransform fails

This commit is contained in:
sabrina-shanman 2018-09-06 10:29:01 -07:00
parent e8ea95e375
commit 3f7a7fb11a
3 changed files with 3 additions and 3 deletions

View file

@ -21,7 +21,7 @@ Transform OverlayTransformNode::getTransform() {
bool success;
Transform jointWorldTransform = overlay->getTransform(_jointIndex, success);
if (!success) {
jointWorldTransform = Transform();
return Transform();
}
jointWorldTransform.setScale(overlay->getBounds().getScale());

View file

@ -21,7 +21,7 @@ Transform AvatarTransformNode::getTransform() {
bool success;
Transform jointWorldTransform = avatar->getTransform(_jointIndex, success);
if (!success) {
jointWorldTransform = Transform();
return Transform();
}
jointWorldTransform.setScale(avatar->scaleForChildren());

View file

@ -21,7 +21,7 @@ Transform EntityTransformNode::getTransform() {
bool success;
Transform jointWorldTransform = entity->getTransform(_jointIndex, success);
if (!success) {
jointWorldTransform = Transform();
return Transform();
}
jointWorldTransform.setScale(entity->getScaledDimensions());