diff options
author | Chien Yang <[email protected]> | 2005-10-27 05:15:43 +0000 |
---|---|---|
committer | Chien Yang <[email protected]> | 2005-10-27 05:15:43 +0000 |
commit | 32482a478f71e9eec0da13911ed9152052ffdbc8 (patch) | |
tree | fac11dc8a3ba20a09531845aa62f44db5a3dc584 | |
parent | 856311c91be569c5d9b952fa6438eeadb6946977 (diff) |
Fixed issue 187 : NPE for new PickFast PickInfo when getting geometries.
git-svn-id: https://svn.java.net/svn/j3d-core~svn/trunk@452 ba19aa83-45c5-6ac9-afd3-db810772062c
-rw-r--r-- | src/classes/share/javax/media/j3d/PickInfo.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/classes/share/javax/media/j3d/PickInfo.java b/src/classes/share/javax/media/j3d/PickInfo.java index b508c49..343c9f6 100644 --- a/src/classes/share/javax/media/j3d/PickInfo.java +++ b/src/classes/share/javax/media/j3d/PickInfo.java @@ -841,6 +841,10 @@ public class PickInfo extends Object { for (int j = 0; j < ((Shape3D)pickNode).numGeometries(); j++) { Geometry geo = ((Shape3D)pickNode).getGeometry(j); + if(geo == null) { + continue; + } + if(!geo.getCapability(Geometry.ALLOW_INTERSECT)) { throw new CapabilityNotSetException(J3dI18N.getString("PickInfo1")); } @@ -904,6 +908,10 @@ public class PickInfo extends Object { for (int j = 0; j < numGeo; j++) { GeometryArray geo = ((Morph)pickNode).getGeometryArray(j); + if(geo == null) { + continue; + } + if(!geo.getCapability(Geometry.ALLOW_INTERSECT)) { throw new CapabilityNotSetException(J3dI18N.getString("PickInfo1")); } |