From 66c1b0b457d4ae7a9d70bcfb59f0ef232d7f0298 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Sun, 1 Dec 2013 01:56:39 +0000 Subject: [PATCH] Modified containsGui() to work like the other contains in that it ignores null. Otherwise, an empty guiNode causes an NPE. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10924 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/renderer/Camera.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/src/core/com/jme3/renderer/Camera.java b/engine/src/core/com/jme3/renderer/Camera.java index 74da04671..2cbf811c3 100644 --- a/engine/src/core/com/jme3/renderer/Camera.java +++ b/engine/src/core/com/jme3/renderer/Camera.java @@ -1059,6 +1059,9 @@ public class Camera implements Savable, Cloneable { * @return True if the camera contains the gui element bounding volume. */ public boolean containsGui(BoundingVolume bound) { + if (bound == null) { + return true; + } return guiBounding.intersects(bound); }