mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +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) {
|
||||
IStatus status = em.refreshExecutables(monitor);
|
||||
|
||||
// Are we in the UIThread? If so spin it until we are
|
||||
// done
|
||||
if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
|
||||
viewer.refresh(inputElement);
|
||||
} else {
|
||||
viewer.getControl().getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
viewer.refresh(inputElement);
|
||||
}
|
||||
});
|
||||
// Are we in the UIThread? If so spin it until we are done
|
||||
if (!viewer.getControl().isDisposed()) {
|
||||
if (viewer.getControl().getDisplay().getThread() == Thread.currentThread()) {
|
||||
viewer.refresh(inputElement);
|
||||
} else {
|
||||
viewer.getControl().getDisplay().asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
viewer.refresh(inputElement);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
monitor.done();
|
||||
|
|
Loading…
Add table
Reference in a new issue