From 916992ab3d21ba294bfc8180c40e2b40d86cd511 Mon Sep 17 00:00:00 2001 From: Kaloyan Raev Date: Tue, 12 Jan 2016 16:18:46 +0200 Subject: [PATCH] Bug 485658 - NPE prevents displaying the actual error Change-Id: I66ec6d071a6807e6f90835bdc09e9cc46e6808fe Signed-off-by: Kaloyan Raev --- .../tm/terminal/connector/process/ProcessConnector.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/org.eclipse.tm.terminal.connector.process/src/org/eclipse/tm/terminal/connector/process/ProcessConnector.java b/plugins/org.eclipse.tm.terminal.connector.process/src/org/eclipse/tm/terminal/connector/process/ProcessConnector.java index 63913543c95..d4d8a7eef4a 100644 --- a/plugins/org.eclipse.tm.terminal.connector.process/src/org/eclipse/tm/terminal/connector/process/ProcessConnector.java +++ b/plugins/org.eclipse.tm.terminal.connector.process/src/org/eclipse/tm/terminal/connector/process/ProcessConnector.java @@ -1,11 +1,12 @@ /******************************************************************************* - * Copyright (c) 2011, 2015 Wind River Systems, Inc. and others. All rights reserved. + * Copyright (c) 2011, 2016 Wind River Systems, Inc. and others. All rights reserved. * This program and the accompanying materials are made available under the terms * of the Eclipse Public License v1.0 which accompanies this distribution, and is * available at http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Wind River Systems - initial API and implementation + * Kaloyan Raev - Bug 485658 - NPE prevents displaying the actual error *******************************************************************************/ package org.eclipse.tm.terminal.connector.process; @@ -241,7 +242,9 @@ public class ProcessConnector extends AbstractStreamsConnector { @Override public void doDisconnect() { // Stop monitoring the process - monitor.dispose(); + if (monitor != null) { + monitor.dispose(); + } boolean isWindows = Platform.OS_WIN32.equals(Platform.getOS());