From afab5f1cbf5996147bf08288a41771fe77b2ccaa Mon Sep 17 00:00:00 2001 From: David Rowe Date: Wed, 18 Jun 2014 20:52:17 -0700 Subject: [PATCH] Fix startup crash where Hydra controllers are not properly plugged in Crash occurs if the left controller is plugged in but right one isn't. --- interface/src/avatar/SkeletonModel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/avatar/SkeletonModel.cpp b/interface/src/avatar/SkeletonModel.cpp index 576545f115..af070a91bd 100644 --- a/interface/src/avatar/SkeletonModel.cpp +++ b/interface/src/avatar/SkeletonModel.cpp @@ -66,7 +66,7 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) { hand->getLeftRightPalmIndices(leftPalmIndex, rightPalmIndex); const float HAND_RESTORATION_RATE = 0.25f; - if (leftPalmIndex == -1) { + if (leftPalmIndex == -1 || rightPalmIndex == -1) { // palms are not yet set, use mouse if (_owningAvatar->getHandState() == HAND_STATE_NULL) { restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY);