Fixed a NPE. Note it's already fixed in CDT head.
authorl12wang
Thu, 28 Jan 2010 17:33:54 -0600
changeset 131 6cbf17faf712
parent 130 51404ed29eed
child 133 996f2f4e33c7
Fixed a NPE. Note it's already fixed in CDT head.
cdt/cdt_6_0_x/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java
--- a/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java	Thu Jan 14 17:13:39 2010 -0600
+++ b/cdt/cdt_6_0_x/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/internal/ui/disassembly/DisassemblyPart.java	Thu Jan 28 17:33:54 2010 -0600
@@ -2448,6 +2448,13 @@
 
 	@DsfServiceEventHandler
 	public void handleEvent(IExitedDMEvent event) {
+		// Note we may get more than one ExitedDMEvent for contexts 
+		// (threads, processes, etc.) in this debug session. So check
+		// for NPE.
+		// This is already fixed in CDT head....01/28/10
+		if (fTargetContext == null)
+			return;
+		
 		final IExecutionDMContext context= event.getDMContext();
 		if (context.equals(fTargetContext)
 				|| DMContexts.isAncestorOf(fTargetContext, context)) {