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:
parent
d5963828f4
commit
2a9515f36d
1 changed files with 12 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue