Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2017-01-06 15:40:56 +0000
committerGerrit Code Review @ Eclipse.org2017-01-19 14:23:47 +0000
commited0fccf4c1e2a817d63b33fb81c997f319827285 (patch)
treec59f04ef1a7550c8c25fe8d1e50a143157af7e8a /plugins/uml
parentd72ee4c103fd6967eafe347ceb5711653dc1c936 (diff)
downloadorg.eclipse.papyrus-ed0fccf4c1e2a817d63b33fb81c997f319827285.tar.gz
org.eclipse.papyrus-ed0fccf4c1e2a817d63b33fb81c997f319827285.tar.xz
org.eclipse.papyrus-ed0fccf4c1e2a817d63b33fb81c997f319827285.zip
Bug 508277 - SWTException below DynamicBodyEditor.disposeBodyEditor
(thrown in Widget.checkWidget) https://bugs.eclipse.org/bugs/show_bug.cgi?id=508277 - add test of dispose before call getChildren on Composite. Change-Id: I0ce0219714612f35359cb2c6096d3f4524742c69 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
index 3a1fe1dfdfd..cf55f100fdb 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/DynamicBodyEditor.java
@@ -136,8 +136,10 @@ public class DynamicBodyEditor extends AbstractValueEditor implements Listener {
private void disposeBodyEditor() {
currentEditor.removeChangeListener(this);
currentEditor.dispose();
- for (Control control : bodyEditorContainer.getChildren()) {
- control.dispose();
+ if (null != bodyEditorContainer && !bodyEditorContainer.isDisposed()) {
+ for (Control control : bodyEditorContainer.getChildren()) {
+ control.dispose();
+ }
}
}

Back to the top