changeset 3839:d59635859529

fix broken TabPaneTest
author psomashe
date Tue, 04 Jun 2013 16:02:45 -0700
parents 1ee27e0ef269
children a2978f7aae56
files javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Tue Jun 04 00:16:21 2013 -0700
+++ b/javafx-ui-controls/src/com/sun/javafx/scene/control/skin/TabPaneSkin.java	Tue Jun 04 16:02:45 2013 -0700
@@ -227,7 +227,7 @@
         selectedTab = getSkinnable().getSelectionModel().getSelectedItem();
         // If load-selected-tab property is set - then load only the contents of selected tab.
         if (!LOAD_ALL_TABS) {
-            addTabContent(selectedTab);
+            if (selectedTab != null) addTabContent(selectedTab);
         }
         isSelectingTab = false;
 
@@ -1520,7 +1520,7 @@
         }
 
         private void updateContent() {
-            if (getTab().getContent() != null) {
+            if (getTab() != null && getTab().getContent() != null) {
                 getChildren().add(getTab().getContent());
             }
         }