Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2008-05-08 16:09:00 -0400
committerCurtis Windatt2008-05-08 16:09:00 -0400
commite7e36ede8422b52a1ea624423f85eac9103a8e36 (patch)
treeebc194969339e5513bd8433a8c4f8fdda1939105 /org.eclipse.debug.ui
parent9eb9c012cc98f12683c7fb3054127027f261e385 (diff)
downloadeclipse.platform.debug-e7e36ede8422b52a1ea624423f85eac9103a8e36.tar.gz
eclipse.platform.debug-e7e36ede8422b52a1ea624423f85eac9103a8e36.tar.xz
eclipse.platform.debug-e7e36ede8422b52a1ea624423f85eac9103a8e36.zip
Bug 230969 - NPE disposing a model proxy
https://bugs.eclipse.org/bugs/show_bug.cgi?id=230969
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java12
1 files changed, 7 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
index 29dba025a..995a82688 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/viewers/update/LaunchManagerProxy.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2006 IBM Corporation and others.
+ * Copyright (c) 2005, 2008 IBM Corporation 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
@@ -30,7 +30,7 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.AbstractModelProxy#init(org.eclipse.debug.internal.ui.viewers.IPresentationContext)
*/
- public void init(IPresentationContext context) {
+ public synchronized void init(IPresentationContext context) {
super.init(context);
fLaunchManager = DebugPlugin.getDefault().getLaunchManager();
fLaunchManager.addLaunchListener(this);
@@ -48,10 +48,12 @@ public class LaunchManagerProxy extends AbstractModelProxy implements ILaunchesL
/* (non-Javadoc)
* @see org.eclipse.debug.internal.ui.viewers.AbstractModelProxy#dispose()
*/
- public void dispose() {
+ public synchronized void dispose() {
super.dispose();
- fLaunchManager.removeLaunchListener(this);
- fLaunchManager = null;
+ if (fLaunchManager != null) {
+ fLaunchManager.removeLaunchListener(this);
+ fLaunchManager = null;
+ }
}
/* (non-Javadoc)

Back to the top