Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Charles David2018-06-11 08:25:14 -0400
committerPierre-Charles David2018-06-11 08:25:20 -0400
commita2a0e97e2b99d7d497dcde96531c06d1decda263 (patch)
tree64ba5a657bd02fe52736b54064d98857ed49f9cd
parent0523591b419d5c30f62f29991098205a35b53d3c (diff)
downloadorg.eclipse.sirius-6.0.0.tar.gz
org.eclipse.sirius-6.0.0.tar.xz
org.eclipse.sirius-6.0.0.zip
[533553] Fix NPE in LayoutOptionPropertySection for options with no labelv6.0.0rc5v6.0.0
Bug: 533553 Change-Id: I93d815c27f7dfde99a162e689056807ace577340 Signed-off-by: Pierre-Charles David <pierre-charles.david@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/editor/properties/sections/description/layoutoption/LayoutOptionPropertySection.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/editor/properties/sections/description/layoutoption/LayoutOptionPropertySection.java b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/editor/properties/sections/description/layoutoption/LayoutOptionPropertySection.java
index 3b9902e714..6f460d4889 100644
--- a/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/editor/properties/sections/description/layoutoption/LayoutOptionPropertySection.java
+++ b/plugins/org.eclipse.sirius.editor.diagram/src/org/eclipse/sirius/editor/properties/sections/description/layoutoption/LayoutOptionPropertySection.java
@@ -128,7 +128,15 @@ public class LayoutOptionPropertySection extends AbstractViewpointPropertySectio
ECollections.sort(layoutOptions, new Comparator<LayoutOption>() {
@Override
public int compare(LayoutOption o1, LayoutOption o2) {
- return o1.getLabel().compareTo(o2.getLabel());
+ String l1 = o1.getLabel();
+ String l2 = o2.getLabel();
+ if (l1 == null) {
+ l1 = "";
+ }
+ if (l2 == null) {
+ l2 = "";
+ }
+ return l1.compareTo(l2);
}
});
for (LayoutOption layoutOption : layoutOptions) {

Back to the top