mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-05 15:25:49 +02:00
NPE fix
This commit is contained in:
parent
121fe1e577
commit
442e988240
1 changed files with 7 additions and 2 deletions
|
@ -133,16 +133,21 @@ public class StackFrame extends CObject implements ICDIStackFrame {
|
||||||
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getLocation()
|
* @see org.eclipse.cdt.debug.core.cdi.model.ICDIStackFrame#getLocation()
|
||||||
*/
|
*/
|
||||||
public ICDILocation getLocation() {
|
public ICDILocation getLocation() {
|
||||||
|
BigInteger addr = BigInteger.ZERO;
|
||||||
if (frame != null) {
|
if (frame != null) {
|
||||||
if (fLocation == null) {
|
if (fLocation == null) {
|
||||||
|
String a = frame.getAddress();
|
||||||
|
if (a != null) {
|
||||||
|
addr = MIFormat.getBigInteger(a);
|
||||||
|
}
|
||||||
fLocation = new Location(frame.getFile(),
|
fLocation = new Location(frame.getFile(),
|
||||||
frame.getFunction(),
|
frame.getFunction(),
|
||||||
frame.getLine(),
|
frame.getLine(),
|
||||||
MIFormat.getBigInteger(frame.getAddress()));
|
addr);
|
||||||
}
|
}
|
||||||
return fLocation;
|
return fLocation;
|
||||||
}
|
}
|
||||||
return new Location("", "", 0, BigInteger.ZERO); //$NON-NLS-1$ //$NON-NLS-2$
|
return new Location("", "", 0, addr); //$NON-NLS-1$ //$NON-NLS-2$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue