1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

[298101] Check against null runControl service.

This commit is contained in:
Marc Khouzam 2009-12-17 19:48:14 +00:00
parent d5963828f4
commit 2a9515f36d

View file

@ -2712,13 +2712,23 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
return false;
}
if (session.getExecutor().isInExecutorThread()) {
return getRunControl().isSuspended(targetContext);
IRunControl runControl = getRunControl();
if (runControl == null) {
return false;
} else {
return runControl.isSuspended(targetContext);
}
}
Query<Boolean> query = new Query<Boolean>() {
@Override
protected void execute(DataRequestMonitor<Boolean> rm) {
try {
rm.setData(getRunControl().isSuspended(targetContext));
IRunControl runControl = getRunControl();
if (runControl == null) {
rm.setData(false);
} else {
rm.setData(runControl.isSuspended(targetContext));
}
} finally {
rm.done();
}