mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-15 20:25:46 +02:00
[290880] add null-pointer check on frame.getAddress() return value (applied patch)
This commit is contained in:
parent
f53c0d4f1d
commit
c146f5ae4d
1 changed files with 3 additions and 2 deletions
|
@ -13,6 +13,7 @@ package org.eclipse.cdt.debug.internal.ui.elements.adapters;
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.IAddress;
|
||||||
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
import org.eclipse.cdt.debug.core.CDebugCorePlugin;
|
||||||
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
|
import org.eclipse.cdt.debug.core.model.ICLineBreakpoint;
|
||||||
import org.eclipse.cdt.debug.core.model.ICStackFrame;
|
import org.eclipse.cdt.debug.core.model.ICStackFrame;
|
||||||
|
@ -75,8 +76,8 @@ public class DisassemblyElementAnnotationProvider implements IDocumentElementAnn
|
||||||
if ( element instanceof IDisassemblyInstruction ) {
|
if ( element instanceof IDisassemblyInstruction ) {
|
||||||
BigInteger address = ((IDisassemblyInstruction)element).getAdress().getValue();
|
BigInteger address = ((IDisassemblyInstruction)element).getAdress().getValue();
|
||||||
ICStackFrame frame = (ICStackFrame)input;
|
ICStackFrame frame = (ICStackFrame)input;
|
||||||
BigInteger frameAddress = frame.getAddress().getValue();
|
IAddress frameAddress = frame.getAddress(); // will return null if frame has been disposed
|
||||||
if ( address.equals( frameAddress ) ) {
|
if ( (frameAddress != null) && address.equals( frameAddress.getValue() ) ) {
|
||||||
IThread thread = frame.getThread();
|
IThread thread = frame.getThread();
|
||||||
boolean topFrame;
|
boolean topFrame;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Add table
Reference in a new issue