Procházet zdrojové kódy

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 před 11 roky
rodič
revize
66c1b0b457
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  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);
     }