Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Dumais2017-02-06 14:54:40 +0000
committerGerrit Code Review @ Eclipse.org2017-02-07 14:57:15 +0000
commit7dbe0de0fe24eca6864be6121c5d8158e75ddbe6 (patch)
tree8020a924a213275cdcd25670e5d2cffbce541e0d /dsf-gdb
parent86189eeb868914ed137fd16c59aff7d521c3e6c5 (diff)
downloadorg.eclipse.cdt-7dbe0de0fe24eca6864be6121c5d8158e75ddbe6.tar.gz
org.eclipse.cdt-7dbe0de0fe24eca6864be6121c5d8158e75ddbe6.tar.xz
org.eclipse.cdt-7dbe0de0fe24eca6864be6121c5d8158e75ddbe6.zip
Bug 511727 - NPE in org.eclipse.cdt.tests.dsf.gdb.tests.AutomatedSuite
Diffstat (limited to 'dsf-gdb')
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java
index a8cdc0f8c51..91e06ae4465 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java
@@ -822,7 +822,12 @@ public class MIBreakpointsManager extends AbstractDsfService implements IBreakpo
@Override
protected void handleSuccess() {
Map<ICBreakpoint,Map<String,Object>> platformBPs = fPlatformToAttributesMaps.get(dmc);
- platformBPs.remove(breakpoint);
+ // Note: Protect against NPE. It looks like we just checked the "platformBPs" is not null,
+ // in doUninstallBreakpoint(), but there is a race condition that can make it null
+ // in the meantime, if the debug session is destroyed. See bug 511727
+ if (platformBPs != null) {
+ platformBPs.remove(breakpoint);
+ }
super.handleSuccess();
}
});

Back to the top