Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Porhel2018-02-22 08:38:07 +0000
committerMaxime Porhel2018-02-22 08:38:07 +0000
commit385794f3352250ce80aea951a0636e6d37db525b (patch)
treeb6d337a0df7b0b9caa9f8bff64a209fa2c7364c4
parentf149f029aef5d43315f6385e236e67f18c5394e4 (diff)
downloadorg.eclipse.sirius-4.1.9.tar.gz
org.eclipse.sirius-4.1.9.tar.xz
org.eclipse.sirius-4.1.9.zip
[531513] Avoid NPE if the border color of the style is nullv4.1.9
Bug: 531513 Change-Id: I7496497ea448eea75d9b4c244c7dac3d76bd6024 Signed-off-by: Maxime Porhel <maxime.porhel@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/figure/ContainerWithTitleBlockFigure.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/figure/ContainerWithTitleBlockFigure.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/figure/ContainerWithTitleBlockFigure.java
index da3d87191d..1b2d4afb69 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/figure/ContainerWithTitleBlockFigure.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/figure/ContainerWithTitleBlockFigure.java
@@ -181,7 +181,9 @@ public class ContainerWithTitleBlockFigure extends SiriusDefaultSizeNodeFigure {
private Color geBorderColor() {
if (viewNode.getStyle() instanceof BorderedStyle) {
RGBValues borderColor = ((BorderedStyle) viewNode.getStyle()).getBorderColor();
- return new Color(null, borderColor.getRed(), borderColor.getGreen(), borderColor.getBlue());
+ if (borderColor != null) {
+ return new Color(null, borderColor.getRed(), borderColor.getGreen(), borderColor.getBlue());
+ }
}
return ColorConstants.black;
}

Back to the top