changeset 7843:f166fe3c0547

RT-38446: [DialogPane] NPE on setExpanded if there's nothing to expand
author jgiles
date Fri, 29 Aug 2014 14:07:10 +1200
parents 5c12620f83f9
children a3783295a258 f3731ef0c7f4
files modules/controls/src/main/java/javafx/scene/control/DialogPane.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/modules/controls/src/main/java/javafx/scene/control/DialogPane.java	Fri Aug 29 13:48:39 2014 +1200
+++ b/modules/controls/src/main/java/javafx/scene/control/DialogPane.java	Fri Aug 29 14:07:10 2014 +1200
@@ -624,7 +624,11 @@
     private final BooleanProperty expandedProperty = new SimpleBooleanProperty(this, "expanded", false) {
         protected void invalidated() {
             final Node expandableContent = getExpandableContent();
-            expandableContent.setVisible(isExpanded());
+
+            if (expandableContent != null) {
+                expandableContent.setVisible(isExpanded());
+            }
+
             requestLayout();
         }
     };