summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskovalsky2012-05-22 15:46:16 (EDT)
committer mgolubev2012-05-22 15:46:16 (EDT)
commitfdd37d4f2dff95bb6d5b8010fc640e0f34d68c22 (patch)
treecb9b9d22a97207e486b77fc607e3eda32614a325
parenta1a47bf74907be1c9a57499069f56ce4b382142b (diff)
downloadorg.eclipse.gmf-tooling-fdd37d4f2dff95bb6d5b8010fc640e0f34d68c22.zip
org.eclipse.gmf-tooling-fdd37d4f2dff95bb6d5b8010fc640e0f34d68c22.tar.gz
org.eclipse.gmf-tooling-fdd37d4f2dff95bb6d5b8010fc640e0f34d68c22.tar.bz2
[380320] - fixed NPE on creation vertical label with initial text
(TOE sample)
-rw-r--r--plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/draw2d/labels/VerticalLabel.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/draw2d/labels/VerticalLabel.java b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/draw2d/labels/VerticalLabel.java
index e8bf9d4..f2b79ad 100644
--- a/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/draw2d/labels/VerticalLabel.java
+++ b/plugins/org.eclipse.gmf.tooling.runtime/src/org/eclipse/gmf/tooling/runtime/draw2d/labels/VerticalLabel.java
@@ -85,6 +85,9 @@ public class VerticalLabel extends ImageFigure {
if (getText() == null) {
return null;
}
+ if (getFont() == null) {
+ return null;
+ }
Image image = ImageUtilities.createRotatedImageOfString(getText(), getFont(), getForegroundColor(), getBackgroundColor());
super.setImage(image);
return image;