Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-01-16 06:42:39 +0000
committerAlexander Kurtakov2018-01-16 06:44:07 +0000
commitb9cd894e2e65adb61527215cc8bcf4b1bb76b2b3 (patch)
treee01a4f2de5b68929c36a17552ec5f182ff4ceefe /examples
parente8330a30cc594835c3c90ceff30a1f24bf1c3cc8 (diff)
downloadeclipse.platform.swt-b9cd894e2e65adb61527215cc8bcf4b1bb76b2b3.tar.gz
eclipse.platform.swt-b9cd894e2e65adb61527215cc8bcf4b1bb76b2b3.tar.xz
eclipse.platform.swt-b9cd894e2e65adb61527215cc8bcf4b1bb76b2b3.zip
Bug 517401 - [GTK] ControlExample NPE when selecting listener after
opened shell Decrease shellCount on shell disposal not only when closing all shells. Change-Id: I84823a71a5c4656ba9d927a79498b69349a9f413 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
index df4e27df6b..a66309373f 100644
--- a/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
+++ b/examples/org.eclipse.swt.examples/src/org/eclipse/swt/examples/controlexample/ShellTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2018 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -107,7 +107,7 @@ class ShellTab extends Tab {
Button close = new Button(currentShell, SWT.PUSH);
close.setBounds(160, 20, 120, 30);
close.setText(ControlExample.getResourceString("Close"));
- close.addListener(SWT.Selection, event1 -> currentShell.dispose());
+ close.addListener(SWT.Selection, event1 -> {currentShell.dispose(); shellCount--;});
/* Set the size, title, and image, and open the shell */
currentShell.setSize (300, 100);

Back to the top