mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-01 06:05:24 +02:00
Bug 529762 - [launchbar] "widget is disposed" sometimes at startup
Additional isDisposed checks added to prevent unhandled event loop exceptions at platform startup on new workspaces. Change-Id: Ib2e33def766c23719e483496d110644a2cd8a712 Signed-off-by: Mat Booth <mat.booth@redhat.com>
This commit is contained in:
parent
494fbe48cb
commit
b56b76df66
1 changed files with 12 additions and 2 deletions
|
@ -182,6 +182,10 @@ public class LaunchBarControl implements ILaunchBarListener {
|
|||
|
||||
@Override
|
||||
public void activeLaunchDescriptorChanged(ILaunchDescriptor descriptor) {
|
||||
if (container == null || container.isDisposed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
container.getDisplay().asyncExec(() -> {
|
||||
if (configSelector != null) {
|
||||
configSelector.setDelayedSelection(descriptor, SELECTION_DELAY);
|
||||
|
@ -191,13 +195,19 @@ public class LaunchBarControl implements ILaunchBarListener {
|
|||
if (targetSelector == null || targetSelector.isDisposed()) {
|
||||
createTargetSelector();
|
||||
syncSelectors();
|
||||
container.getParent().layout(true);
|
||||
if (!container.isDisposed()) {
|
||||
Composite parent = container.getParent();
|
||||
parent.layout(true);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (targetSelector != null && !targetSelector.isDisposed()) {
|
||||
onLabel.dispose();
|
||||
targetSelector.dispose();
|
||||
container.getParent().layout(true);
|
||||
if (!container.isDisposed()) {
|
||||
Composite parent = container.getParent();
|
||||
parent.layout(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue