]> source.dussan.org Git - jgit.git/commitdiff
Prevent NPE during fetch and push via SSH 22/2922/1
authorMatthias Sohn <matthias.sohn@sap.com>
Fri, 25 Mar 2011 02:01:50 +0000 (19:01 -0700)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 25 Mar 2011 02:01:50 +0000 (19:01 -0700)
Bug: 340928
Change-Id: I870b77eeffa70a57891d7253a06ad7d44d808ee4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java

index 33a87109bf3834c8e27230010be810b5510128a8..c50044801a74fcf6fa0046e8c55deec873024b06 100644 (file)
@@ -290,7 +290,8 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
                        }
 
                        super.close();
-                       process.destroy();
+                       if (process != null)
+                               process.destroy();
                }
        }
 
@@ -347,7 +348,8 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
                        }
 
                        super.close();
-                       process.destroy();
+                       if (process != null)
+                               process.destroy();
                }
        }
 }