changeset 5572:6633eea3285d

RT-33922: add null check in Labeled#applyStyle
author David Grieve<david.grieve@oracle.com>
date Tue, 29 Oct 2013 18:58:30 -0400
parents cbcef6b84c73
children 2271f1e4a95c
files modules/controls/src/main/java/javafx/scene/control/Labeled.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Tue Oct 29 15:50:44 2013 -0700
+++ b/modules/controls/src/main/java/javafx/scene/control/Labeled.java	Tue Oct 29 18:58:30 2013 -0400
@@ -461,7 +461,7 @@
                     this.origin = origin;
 
                     // Don't want applyStyle to throw an exception which would leave this.origin set to the wrong value
-                    if (graphic.isBound() == false) super.applyStyle(origin, v);
+                    if (graphic == null || graphic.isBound() == false) super.applyStyle(origin, v);
 
                     // Origin is only valid for this invocation of applyStyle, so reset it to USER in case someone calls set.
                     this.origin = StyleOrigin.USER;