From 519101cc5434bb0e60c6aab46466dd29bb1cadb9 Mon Sep 17 00:00:00 2001 From: Andrey Loskutov Date: Sun, 10 Feb 2019 18:49:01 +0100 Subject: Bug 544313 - NPE on workbench close if debug view in foreground Change-Id: I057c371f8280482636a5ffa9f618d2afbaf4b46f Signed-off-by: Andrey Loskutov --- .../eclipse/debug/internal/ui/contexts/DebugWindowContextService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java index a6a251df0..c319e00bb 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/contexts/DebugWindowContextService.java @@ -118,6 +118,10 @@ public class DebugWindowContextService implements IDebugContextService, IPartLis if (index >= 0) { fProvidersByPartId.remove( getCombinedPartId(provider.getPart()) ); fProviders.remove(index); + if (fWindow != null && fWindow.isClosing()) { + provider.removeDebugContextListener(this); + return; + } IDebugContextProvider activeProvider = getActiveProvider(); if (index == 0) { if (activeProvider != null) { -- cgit v1.2.3