Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
index 91311ff80ec..9bae204100a 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/figure/node/SVGNodePlateFigure.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2014, 2018 CEA LIST and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,6 +10,7 @@
* Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
* Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Refactoring, cleanup, added support for PapyrusLabel element
* Mickael ADAM (ALL4TEC) mickael.adam@all4tec.net - Add IRoundedRectangleFigure use case(436547)
+ * Ansgar Radermacher (CEA LIST) ansgar.radermacher@cea.fr - NPE if SVG unit is not in pixels (521232)
*
*****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.figure.node;
@@ -194,7 +195,13 @@ public class SVGNodePlateFigure extends DefaultSizeNodeFigure {
if (base == null) {
return 0;
}
- return base.getValue();
+ try {
+ return base.getValue();
+ }
+ catch (NullPointerException e) {
+ // NPE during getValue (bug 521232) => retry using getValueInSpecifiedUnits)
+ return base.getValueInSpecifiedUnits();
+ }
}
/**

Back to the top