NameFinder.java (close): IN, OUT, and PROC can all be null, check for that case and...
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 22 Apr 2005 17:43:50 +0000 (17:43 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 22 Apr 2005 17:43:50 +0000 (10:43 -0700)
2005-04-22  Andrew Pinski  <pinskia@physics.uc.edu>

        * gnu/gcj/runtime/NameFinder.java (close): IN, OUT, and PROC can all
        be null, check for that case and don't deference it.

From-SVN: r98573

libjava/ChangeLog
libjava/gnu/gcj/runtime/NameFinder.java

index b85cdf23eaa270a793b227b79f6f09692ab03304..1a9c0ba31bc8ef705e6ed34b6ed2a256b6cc6c05 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-22  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * gnu/gcj/runtime/NameFinder.java (close): IN, OUT, and PROC can all
+       be null, check for that case and don't deference it.
+
 2005-04-22  Sven de Marothy  <sven@physto.se>
 
        * java/util/logging/LogManager.java: Reformatted.
index 5469f08168d6bd8979908176a52ad707d8d0efbd..4c629bb22ece41693845f8e5d9abfedf7fbf8778 100644 (file)
@@ -86,12 +86,14 @@ public class NameFinder
     {
       try
       {
-       in.close();
-       out.close();
+       if (in != null)
+         in.close();
+       if (out != null)
+         out.close();
       }
       catch (IOException x) {}
-
-      proc.destroy();
+      if (proc != null)
+       proc.destroy();
     }
   }