Sfoglia il codice sorgente

- also do check for input stream in Natives extraction

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8825 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
nor..67 14 anni fa
parent
commit
2c0fe5e938
1 ha cambiato i file con 5 aggiunte e 0 eliminazioni
  1. 5 0
      engine/src/desktop/com/jme3/system/Natives.java

+ 5 - 0
engine/src/desktop/com/jme3/system/Natives.java

@@ -160,7 +160,9 @@ public class Natives {
                 out.write(buf, 0, len);
             }
             in.close();
+            in = null;
             out.close();
+            out = null;
 
             // NOTE: On OSes that support "Date Created" property, 
             // this will cause the last modified date to be lower than
@@ -176,6 +178,9 @@ public class Natives {
             if (load) {
                 System.load(targetFile.getAbsolutePath());
             }
+            if(in != null){
+                in.close();
+            }
             if(out != null){
                 out.close();
             }