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
experimental
PSp..om 11 years ago
parent 9d63a7fc02
commit 66c1b0b457
  1. 3
      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. * @return True if the camera contains the gui element bounding volume.
*/ */
public boolean containsGui(BoundingVolume bound) { public boolean containsGui(BoundingVolume bound) {
if (bound == null) {
return true;
}
return guiBounding.intersects(bound); return guiBounding.intersects(bound);
} }

Loading…
Cancel
Save