Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2015-01-16 13:35:19 -0500
committerEugene Tarassov2015-01-16 13:35:19 -0500
commit74d27abcff67ff6679a36baadb05d849d534ce02 (patch)
tree4742207500fb9351cff1440a0ccd964d0fe0f9e7
parent76357669b9ddd084d917685ce3f67f3e38c182bd (diff)
downloadorg.eclipse.tcf-74d27abcff67ff6679a36baadb05d849d534ce02.tar.gz
org.eclipse.tcf-74d27abcff67ff6679a36baadb05d849d534ce02.tar.xz
org.eclipse.tcf-74d27abcff67ff6679a36baadb05d849d534ce02.zip
TCF Debugger: fixed: when disposed, debug model does not remove service listeners. This can cause NPE.
-rw-r--r--plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
index d141a12bf..d46c88191 100644
--- a/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
+++ b/plugins/org.eclipse.tcf.debug.ui/src/org/eclipse/tcf/internal/debug/ui/model/TCFModel.java
@@ -876,6 +876,18 @@ public class TCFModel implements ITCFModel, IElementContentProvider, IElementLab
locks.clear();
for (TCFSnapshot s : arr) s.dispose();
}
+ IMemory mem = launch.getService(IMemory.class);
+ if (mem != null) mem.removeListener(mem_listener);
+ IRunControl run = launch.getService(IRunControl.class);
+ if (run != null) run.removeListener(run_listener);
+ IMemoryMap mmap = launch.getService(IMemoryMap.class);
+ if (mmap != null) mmap.removeListener(mmap_listener);
+ IPathMap pmap = launch.getService(IPathMap.class);
+ if (pmap != null) pmap.removeListener(pmap_listener);
+ IRegisters reg = launch.getService(IRegisters.class);
+ if (reg != null) reg.removeListener(reg_listener);
+ IProcesses prs = launch.getService(IProcesses.class);
+ if (prs != null) prs.removeListener(prs_listener);
if (launch_node != null) {
launch_node.dispose();
launch_node = null;

Back to the top