1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-24 09:25:31 +02:00

Fix potential NPE or widget is disposed error

This commit is contained in:
Anton Leherbauer 2013-10-24 14:53:38 +02:00
parent 66acca58ba
commit 8266544aee
2 changed files with 22 additions and 27 deletions

View file

@ -175,9 +175,6 @@ class DisassemblyColumnSupport implements IColumnSupport {
if (getRuler() == null)
return false;
if (descriptor == null)
return false;
return descriptor.matchesPart(fDisassembly);
}

View file

@ -1921,32 +1921,30 @@ public abstract class DisassemblyPart extends WorkbenchPart implements IDisassem
private void startUpdate(final Runnable update) {
if (fViewer == null)
return;
final int updateCount = fUpdateCount;
final SafeRunnable safeUpdate = new SafeRunnable() {
@Override
final int updateCount = fUpdateCount;
final SafeRunnable safeUpdate = new SafeRunnable() {
@Override
public void run() {
if (updateCount == fUpdateCount) {
update.run();
}
}
@Override
public void handleException(Throwable e) {
internalError(e);
}
};
if (fUpdatePending) {
invokeLater(new Runnable() {
@Override
if (updateCount == fUpdateCount && fViewer != null) {
update.run();
}
}
@Override
public void handleException(Throwable e) {
internalError(e);
}
};
if (fUpdatePending) {
invokeLater(new Runnable() {
@Override
public void run() {
if (updateCount == fUpdateCount) {
SafeRunner.run(safeUpdate);
}
}
});
} else {
SafeRunner.run(safeUpdate);
}
SafeRunner.run(safeUpdate);
}
});
} else {
SafeRunner.run(safeUpdate);
}
}
private void debugContextChanged() {