1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

[290880] add null-pointer check on frame.getAddress() return value (applied patch)

This commit is contained in:
John Cortell 2009-10-01 02:22:03 +00:00
parent f53c0d4f1d
commit c146f5ae4d

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.internal.ui.elements.adapters;
import java.math.BigInteger;
import org.eclipse.cdt.core.IAddress;
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
import org.eclipse.cdt.debug.core.model.ICStackFrame;
@ -75,8 +76,8 @@ public class DisassemblyElementAnnotationProvider implements IDocumentElementAnn
if ( element instanceof IDisassemblyInstruction ) {
BigInteger address = ((IDisassemblyInstruction)element).getAdress().getValue();
ICStackFrame frame = (ICStackFrame)input;
BigInteger frameAddress = frame.getAddress().getValue();
if ( address.equals( frameAddress ) ) {
IAddress frameAddress = frame.getAddress(); // will return null if frame has been disposed
if ( (frameAddress != null) && address.equals( frameAddress.getValue() ) ) {
IThread thread = frame.getThread();
boolean topFrame;
try {