mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-09 18:56:02 +02:00
Terminal: Fix SWT widget disposed exception on shutdown if terminal is
still open
This commit is contained in:
parent
d1c5c40a18
commit
c2e7aaa652
1 changed files with 1 additions and 1 deletions
|
@ -1104,7 +1104,7 @@ public class VT100TerminalControl implements ITerminalControlForText, ITerminalC
|
||||||
private void runAsyncInDisplayThread(Runnable runnable) {
|
private void runAsyncInDisplayThread(Runnable runnable) {
|
||||||
if(Display.findDisplay(Thread.currentThread())!=null)
|
if(Display.findDisplay(Thread.currentThread())!=null)
|
||||||
runnable.run();
|
runnable.run();
|
||||||
else if(PlatformUI.isWorkbenchRunning())
|
else if(PlatformUI.isWorkbenchRunning() && PlatformUI.getWorkbench().getDisplay() != null && !PlatformUI.getWorkbench().getDisplay().isDisposed())
|
||||||
PlatformUI.getWorkbench().getDisplay().asyncExec(runnable);
|
PlatformUI.getWorkbench().getDisplay().asyncExec(runnable);
|
||||||
// else should not happen and we ignore it...
|
// else should not happen and we ignore it...
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue