From 8da01910c3d9bae328c1e704ef627d80888441a7 Mon Sep 17 00:00:00 2001 From: Chien Yang Date: Mon, 8 Oct 2007 23:54:09 +0000 Subject: Fixed Issue 506 : NullPointerException: Calling getNominalSensorRotation in WandViewBehavior when internal nominalSensorRotation is null causes a NullPointerException. Fixed as suggested in Issue report. git-svn-id: https://svn.java.net/svn/j3d-core-utils~svn/trunk@171 9497e636-51bd-65ba-982d-a4982e1767a5 --- .../share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/classes/share') diff --git a/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java b/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java index 66e2842..42882d0 100644 --- a/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java +++ b/src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java @@ -3435,7 +3435,11 @@ public class WandViewBehavior extends ViewPlatformBehavior { * nominal sensor transform */ public void getNominalSensorRotation(Transform3D t3d) { - t3d.set(nominalSensorRotation) ; + if (nominalSensorRotation != null) { + t3d.set(nominalSensorRotation); + } else { + t3d.setIdentity(); + } } /** -- cgit v1.2.3