mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 17:56:01 +02:00
don't use the control if already disposed.
This commit is contained in:
parent
19b5878bd9
commit
97f1304af9
1 changed files with 11 additions and 10 deletions
|
@ -56,16 +56,17 @@ class ExecutablesContentProvider extends ColumnLabelProvider implements IStructu
|
||||||
protected IStatus run(IProgressMonitor monitor) {
|
protected IStatus run(IProgressMonitor monitor) {
|
||||||
IStatus status = em.refreshExecutables(monitor);
|
IStatus status = em.refreshExecutables(monitor);
|
||||||
|
|
||||||
// Are we in the UIThread? If so spin it until we are
|
// Are we in the UIThread? If so spin it until we are done
|
||||||
// done
|
if (!viewer.getControl().isDisposed()) {
|
||||||
if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
|
if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
|
||||||
viewer.refresh(inputElement);
|
viewer.refresh(inputElement);
|
||||||
} else {
|
} else {
|
||||||
viewer.getControl().getDisplay().asyncExec(new Runnable() {
|
viewer.getControl().getDisplay().asyncExec(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
viewer.refresh(inputElement);
|
viewer.refresh(inputElement);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
monitor.done();
|
monitor.done();
|
||||||
|
|
Loading…
Add table
Reference in a new issue