aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimeon Andreev2018-07-24 06:26:20 -0400
committerSimeon Andreev2018-07-24 06:27:14 -0400
commit90dd90f919f313ff9c30595fc2ecf84ecb689156 (patch)
treebad73031e10932fa696078892ac1f9c3bc562778
parent9fce8c00c3631698c5815b3cf5bfb76cf55cd968 (diff)
downloadeclipse.platform.debug-90dd90f919f313ff9c30595fc2ecf84ecb689156.tar.gz
eclipse.platform.debug-90dd90f919f313ff9c30595fc2ecf84ecb689156.tar.xz
eclipse.platform.debug-90dd90f919f313ff9c30595fc2ecf84ecb689156.zip
Bug 537330 - Breakpoints View NPE on perspective switch during debugI20180727-2000
The error log indicates that at the time of BreakpointsView.contextActivated, the Breakpoints View had no tree model viewer. This caused a NPE to be logged in the Error Log. This change adds a guard to the method, similar to the guard found in VariablesView.contextActivated. This avoids the logged NPE and does not alter behavior otherwise; the rest of BreakpointsView.contextActivated does nothing if there is no tree model. Change-Id: I070a2714c40636fb8796a963b7a3d4c147c04bf9
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
index acfc2bb1c..c265ac15f 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/breakpoints/BreakpointsView.java
@@ -304,6 +304,10 @@ public class BreakpointsView extends VariablesView implements IBreakpointManager
*/
@Override
protected void contextActivated(ISelection selection) {
+ if (!isAvailable() || !isVisible()) {
+ return;
+ }
+
IPresentationContext presentationContext = getTreeModelViewer().getPresentationContext();
if (selection == null || selection.isEmpty()) {