diff options
author | Chien Yang <[email protected]> | 2007-10-08 23:54:09 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2007-10-08 23:54:09 +0000 |
commit | 8da01910c3d9bae328c1e704ef627d80888441a7 (patch) | |
tree | 23f23b6f5caeb97b31318a68841f78f06e6d3b9d /src/classes/share | |
parent | 97c00b2b21e951e613053da835a28f9551fe2a79 (diff) |
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
Diffstat (limited to 'src/classes/share')
-rw-r--r-- | src/classes/share/com/sun/j3d/utils/behaviors/vp/WandViewBehavior.java | 6 |
1 files changed, 5 insertions, 1 deletions
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(); + } } /** |