Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CLabelObservableValue.java20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CLabelObservableValue.java b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CLabelObservableValue.java
index c653eedd906..1a06bfbe460 100644
--- a/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CLabelObservableValue.java
+++ b/plugins/infra/ui/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/databinding/CLabelObservableValue.java
@@ -107,15 +107,17 @@ public class CLabelObservableValue extends AbstractObservableValue {
@Override
protected void doSetValue(Object value) {
this.currentValue = value;
- if (aggregated != null && aggregated.hasDifferentValues()) {
- label.setText(Messages.ReferenceDialogObservable_Unchanged);
- label.setImage(null);
- } else if (currentValue == null) {
- label.setText(Messages.ReferenceDialog_Unset);
- label.setImage(null);
- } else {
- label.setText(labelProvider.getText(value));
- label.setImage(labelProvider.getImage(value));
+ if (null != label && !label.isDisposed()) {
+ if (aggregated != null && aggregated.hasDifferentValues()) {
+ label.setText(Messages.ReferenceDialogObservable_Unchanged);
+ label.setImage(null);
+ } else if (currentValue == null) {
+ label.setText(Messages.ReferenceDialog_Unset);
+ label.setImage(null);
+ } else {
+ label.setText(labelProvider.getText(value));
+ label.setImage(labelProvider.getImage(value));
+ }
}
}
}

Back to the top