diff options
author | Chien Yang <[email protected]> | 2005-10-24 21:49:14 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2005-10-24 21:49:14 +0000 |
commit | 4da85d137678410997036ef79c835bbdf56ade59 (patch) | |
tree | 953dbf42c6be6655cccdf9f3f4d810e0edb8cd8c /src | |
parent | 356bbf2bd325380e16fd77d34fffd084dc1c0928 (diff) |
Fixed issue 183 : NPE if CLOSEST_INTERSECTION_POINT is only flag.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@447 ba19aa83-45c5-6ac9-afd3-db810772062c
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/share/javax/media/j3d/PickInfo.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/classes/share/javax/media/j3d/PickInfo.java b/src/classes/share/javax/media/j3d/PickInfo.java index 64a6392..78c8ab3 100644 --- a/src/classes/share/javax/media/j3d/PickInfo.java +++ b/src/classes/share/javax/media/j3d/PickInfo.java @@ -696,11 +696,10 @@ public class PickInfo extends Object { ((flags & CLOSEST_GEOM_INFO) != 0) || ((flags & CLOSEST_INTERSECTION_POINT) != 0) || ((flags & ALL_GEOM_INFO) != 0)) { - - pickInfo.setNodeRef((Node) s3dCR.srcList[n]); - Transform3D l2vw = geomAtoms[i].source.getCurrentLocalToVworld(); if(pickInfo == null) pickInfo = new PickInfo(); + pickInfo.setNodeRef((Node) s3dCR.srcList[n]); + Transform3D l2vw = geomAtoms[i].source.getCurrentLocalToVworld(); pickInfo.setLocalToVWorldRef(l2vw); } @@ -751,11 +750,10 @@ public class PickInfo extends Object { ((flags & CLOSEST_GEOM_INFO) != 0) || ((flags & CLOSEST_INTERSECTION_POINT) != 0) || ((flags & ALL_GEOM_INFO) != 0)) { - - pickInfo.setNodeRef((Node) srcNode.source); - Transform3D l2vw = geomAtoms[i].source.getCurrentLocalToVworld(); if(pickInfo == null) pickInfo = new PickInfo(); + pickInfo.setNodeRef((Node) srcNode.source); + Transform3D l2vw = geomAtoms[i].source.getCurrentLocalToVworld(); pickInfo.setLocalToVWorldRef(l2vw); } |