Explorar o código

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

PSp..om %!s(int64=11) %!d(string=hai) anos
pai
achega
66c1b0b457
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      engine/src/core/com/jme3/renderer/Camera.java

+ 3 - 0
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);
     }