Skip to content
Snippets Groups Projects
Commit 98634e22 authored by Brutzman, Don's avatar Brutzman, Don
Browse files

handle NPE

parent d5120a04
No related branches found
No related tags found
No related merge requests found
......@@ -2361,11 +2361,21 @@ public class NavigationProcessor implements NodeUpdateListener, OGLTransformNode
@SuppressWarnings("unchecked")
List<SceneGraphPath> pick_results = (List<SceneGraphPath>) terrainPicker.foundPaths;
if (pick_results == null)
{
System.err.println ("*** Xj3D internal error: NavigationProcessor checkCollisions() pick_results == null");
}
else
for (int i = 0; (i < collidePicker.pickCount) && !real_collision; i++) {
// Firstly, check the path to see if this is eligible for picking
// Look at the picked item first, then do a depth traversal of the
// path from the root down to the the node.
if (pick_results.get(i) == null)
{
System.err.println ("*** Xj3D internal error: NavigationProcessor checkCollisions() pick_results.get(" + i + ") == null");
}
SceneGraphPath path = pick_results.get(i);
Node end = path.getTerminalNode();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment