1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

[298104] Protect agains possible NPE

This commit is contained in:
Marc Khouzam 2009-12-18 15:34:26 +00:00
parent 28d4637ace
commit 226a428dff

View file

@ -2145,10 +2145,10 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
stack.getFrameData(fTargetFrameContext, new DataRequestMonitor<IFrameDMData>(executor, null) {
@Override
protected void handleCompleted() {
if (!isCanceled()) {
fUpdatePending= false;
final IFrameDMData frameData= getData();
fTargetFrameData= frameData;
fUpdatePending= false;
IFrameDMData frameData= getData();
fTargetFrameData= frameData;
if (!isCanceled() && frameData != null) {
final IAddress address= frameData.getAddress();
final BigInteger addressValue= address.getValue();
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$
}
});
}
}
}
});