From 5152ed8e2e64ff5dc8a7def67080f0b81f25b8a5 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 24 Mar 2011 19:01:50 -0700 Subject: [PATCH] Prevent NPE during fetch and push via SSH Bug: 340928 Change-Id: I870b77eeffa70a57891d7253a06ad7d44d808ee4 Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/transport/TransportGitSsh.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java index 33a87109b..c50044801 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java @@ -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(); } } }