diff --git a/libjava/ChangeLog b/libjava/ChangeLog index b85cdf23eaa..1a9c0ba31bc 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,8 @@ +2005-04-22 Andrew Pinski + + * 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 * java/util/logging/LogManager.java: Reformatted. diff --git a/libjava/gnu/gcj/runtime/NameFinder.java b/libjava/gnu/gcj/runtime/NameFinder.java index 5469f08168d..4c629bb22ec 100644 --- a/libjava/gnu/gcj/runtime/NameFinder.java +++ b/libjava/gnu/gcj/runtime/NameFinder.java @@ -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(); } }