Crash occurs if the left controller is plugged in but right one isn't.
Showing the changes to interface/src/avatar/SkeletonModel.cpp (1 of 1 file). Show all
Unified · Split
| @@ -66,7 +66,7 @@ void SkeletonModel::simulate(float deltaTime, bool fullUpdate) { · 65 unmodified lines | |||
| 66 | hand->getLeftRightPalmIndices(leftPalmIndex, rightPalmIndex); | 66 | hand->getLeftRightPalmIndices(leftPalmIndex, rightPalmIndex); |
| 67 | 67 | ||
| 68 | const float HAND_RESTORATION_RATE = 0.25f; | 68 | const float HAND_RESTORATION_RATE = 0.25f; |
| 69 | if (leftPalmIndex == -1) { | 69 | if (leftPalmIndex == -1 || rightPalmIndex == -1) { |
| 70 | // palms are not yet set, use mouse | 70 | // palms are not yet set, use mouse |
| 71 | if (_owningAvatar->getHandState() == HAND_STATE_NULL) { | 71 | if (_owningAvatar->getHandState() == HAND_STATE_NULL) { |
| 72 | restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); | 72 | restoreRightHandPosition(HAND_RESTORATION_RATE, PALM_PRIORITY); |