mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
[298104] Protect agains possible NPE
This commit is contained in:
parent
28d4637ace
commit
226a428dff
1 changed files with 13 additions and 4 deletions
|
@ -2145,10 +2145,10 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
stack.getFrameData(fTargetFrameContext, new DataRequestMonitor<IFrameDMData>(executor, null) {
|
stack.getFrameData(fTargetFrameContext, new DataRequestMonitor<IFrameDMData>(executor, null) {
|
||||||
@Override
|
@Override
|
||||||
protected void handleCompleted() {
|
protected void handleCompleted() {
|
||||||
if (!isCanceled()) {
|
fUpdatePending= false;
|
||||||
fUpdatePending= false;
|
IFrameDMData frameData= getData();
|
||||||
final IFrameDMData frameData= getData();
|
fTargetFrameData= frameData;
|
||||||
fTargetFrameData= frameData;
|
if (!isCanceled() && frameData != null) {
|
||||||
final IAddress address= frameData.getAddress();
|
final IAddress address= frameData.getAddress();
|
||||||
final BigInteger addressValue= address.getValue();
|
final BigInteger addressValue= address.getValue();
|
||||||
if (DEBUG) System.out.println("retrieveFrameAddress done "+getAddressText(addressValue)); //$NON-NLS-1$
|
if (DEBUG) System.out.println("retrieveFrameAddress done "+getAddressText(addressValue)); //$NON-NLS-1$
|
||||||
|
@ -2165,6 +2165,15 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
final IStatus status= getStatus();
|
||||||
|
if (status != null && !status.isOK()) {
|
||||||
|
asyncExec(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
ErrorDialog.openError(getSite().getShell(), "Error", null, getStatus()); //$NON-NLS-1$
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue