1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-06 09:16:02 +02:00

Bug 515653: Fix SWT disposed exception

Change-Id: I2d39961189552602464ee96e0464eba060fcfb03
This commit is contained in:
Jonah Graham 2017-04-24 09:15:44 +01:00 committed by Gerrit Code Review @ Eclipse.org
parent cc0955b823
commit fffe6bbf80

View file

@ -30,6 +30,7 @@ import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.IOConsole;
@ -148,13 +149,10 @@ public class TracingConsole extends IOConsole {
final String newName = computeName();
String name = getName();
if (!name.equals(newName)) {
Runnable r = new Runnable() {
@Override
public void run() {
setName(newName);
}
};
PlatformUI.getWorkbench().getDisplay().asyncExec(r);
Display display = PlatformUI.getWorkbench().getDisplay();
if (!display.isDisposed()) {
display.asyncExec(() -> setName(newName));
}
}
}