From ebeb5fc74ced20acad2b1a0069c2a549bcb4c5ef Mon Sep 17 00:00:00 2001 From: irengrig Date: Mon, 13 Dec 2010 14:03:22 +0300 Subject: [PATCH] CVS: NPE if no CVS installed --- .../connections/ConnectionOnProcess.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ConnectionOnProcess.java b/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ConnectionOnProcess.java index 8b034c972ab8..eadfb4d0ccd8 100644 --- a/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ConnectionOnProcess.java +++ b/plugins/cvs/cvs-core/src/com/intellij/cvsSupport2/connections/ConnectionOnProcess.java @@ -59,8 +59,12 @@ public abstract class ConnectionOnProcess implements IConnection { } public synchronized void close() throws IOException { - myWaitForThreadFuture.cancel(true); - myWaitSemaphore.up(); + if (myWaitForThreadFuture != null) { + myWaitForThreadFuture.cancel(true); + } + if (myWaitSemaphore != null) { + myWaitSemaphore.up(); + } try { if (myInputStream != null && !myContainsError) { @@ -84,8 +88,12 @@ public abstract class ConnectionOnProcess implements IConnection { } try { - myErrThread.setProcessTerminated(true); - myStdErrFuture.get(); + if (myErrThread != null) { + myErrThread.setProcessTerminated(true); + } + if (myStdErrFuture != null) { + myStdErrFuture.get(); + } } catch (InterruptedException e) { //