Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Stieber2014-02-12 10:58:50 -0500
committerUwe Stieber2014-02-12 10:58:50 -0500
commit4b574cb4c1ca6e97ea16b738aeb20ac5a8193768 (patch)
tree62e03be9d78697d6b4ef75bbf1aeac4d2576d621
parente350dafcdd9a0e3c7d0d0aeb049fa88fb8bf9b06 (diff)
downloadorg.eclipse.tcf-4b574cb4c1ca6e97ea16b738aeb20ac5a8193768.tar.gz
org.eclipse.tcf-4b574cb4c1ca6e97ea16b738aeb20ac5a8193768.tar.xz
org.eclipse.tcf-4b574cb4c1ca6e97ea16b738aeb20ac5a8193768.zip
Target Explorer: Handle an NPE because of an early shutdown more gracefully
-rw-r--r--target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
index 209148fad..1ee8438e9 100644
--- a/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
+++ b/target_explorer/plugins/org.eclipse.tcf.te.ui.views/src/org/eclipse/tcf/te/ui/views/events/AbstractEventListener.java
@@ -51,7 +51,7 @@ public abstract class AbstractEventListener extends org.eclipse.tcf.te.ui.events
* @return The main view or <code>null</code>.
*/
protected CommonViewer getViewer() {
- if (viewer == null) {
+ if (viewer == null && PlatformUI.isWorkbenchRunning()) {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench != null ? workbench.getActiveWorkbenchWindow() : null;
IWorkbenchPage page = window != null ? window.getActivePage() : null;

Back to the top