Ver código fonte

Fixed a potential NullPointerException

MeFisto94 8 anos atrás
pai
commit
e642bc7eec

+ 3 - 1
jme3-core/src/com/jme3/gde/core/assets/AssetData.java

@@ -218,7 +218,9 @@ public class AssetData {
                         Exceptions.printStackTrace(ex);
                     } finally {
                         try {
-                            in.close();
+                            if (in != null) {
+                                in.close();
+                            }
                         } catch (IOException ex) {
                             Exceptions.printStackTrace(ex);
                         }