Skip to content

Commit

Permalink
v3.1.1 NPE fix in GVRConfigurationManager
Browse files Browse the repository at this point in the history
  • Loading branch information
liaxim committed Mar 1, 2017
1 parent 1108119 commit d372c35
Showing 1 changed file with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,17 @@ protected void configureForHeadset(final String model) {
GVRPerspectiveCamera.setDefaultFovY(fovY);

if (null != viewManager) {
final GVRCameraRig cameraRig = viewManager.getMainScene().getMainCameraRig();
updatePerspectiveCameraFovY(cameraRig.getLeftCamera(), fovY);
updatePerspectiveCameraFovY(cameraRig.getRightCamera(), fovY);
updatePerspectiveCameraFovY(cameraRig.getCenterCamera(), fovY);
viewManager.runOnGlThread(new Runnable() {
@Override
public void run() {
//when the viewmgr starts executing drawframelisteners it has a main scene
//and a camera rig
final GVRCameraRig cameraRig = viewManager.getMainScene().getMainCameraRig();
updatePerspectiveCameraFovY(cameraRig.getLeftCamera(), fovY);
updatePerspectiveCameraFovY(cameraRig.getRightCamera(), fovY);
updatePerspectiveCameraFovY(cameraRig.getCenterCamera(), fovY);
}
});
}
}

Expand Down

0 comments on commit d372c35

Please sign in to comment.