mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 09:25:31 +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()
|
||||
*/
|
||||
public ICDILocation getLocation() {
|
||||
BigInteger addr = BigInteger.ZERO;
|
||||
if (frame != null) {
|
||||
if (fLocation == null) {
|
||||
String a = frame.getAddress();
|
||||
if (a != null) {
|
||||
addr = MIFormat.getBigInteger(a);
|
||||
}
|
||||
fLocation = new Location(frame.getFile(),
|
||||
frame.getFunction(),
|
||||
frame.getLine(),
|
||||
MIFormat.getBigInteger(frame.getAddress()));
|
||||
addr);
|
||||
}
|
||||
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