Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Loskutov2019-04-22 22:22:42 +0000
committerAndrey Loskutov2019-04-22 22:22:42 +0000
commit3603b78f540b0ed6f0927465e8a3202ae6acf698 (patch)
tree11c13a99d1b37028ce5475dfeaa05934007c0bf8
parentb621bc2634284592c44a531de4746470e56c261c (diff)
downloadeclipse.platform.debug-3603b78f540b0ed6f0927465e8a3202ae6acf698.tar.gz
eclipse.platform.debug-3603b78f540b0ed6f0927465e8a3202ae6acf698.tar.xz
eclipse.platform.debug-3603b78f540b0ed6f0927465e8a3202ae6acf698.zip
Bug 498428 - NPE on dispose of RunToLineActionI20190423-1800
Change-Id: I9910191e72540dcc9b49647ee4cc174ee174e3e2 Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineAction.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineAction.java
index 15c9cf1f2..c8d9667df 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/actions/RunToLineAction.java
@@ -151,7 +151,12 @@ public class RunToLineAction extends Action implements IUpdate {
public void dispose() {
IDebugContextManager manager = DebugUITools.getDebugContextManager();
if (fActivePart != null) {
- manager.getContextService(fActivePart.getSite().getWorkbenchWindow()).removeDebugContextListener(fContextListener);
+ IWorkbenchWindow ww = fActivePart.getSite().getWorkbenchWindow();
+ if (ww != null) {
+ manager.getContextService(ww).removeDebugContextListener(fContextListener);
+ } else {
+ manager.removeDebugContextListener(fContextListener);
+ }
}
fActivePart = null;
fTargetElement = null;

Back to the top