6888130: SwingSet2: Demo is not launching and throwing NPE.
authorlana
Mon, 07 Jun 2010 15:35:36 -0700
changeset 5630 9606922fdd90
parent 5629 41a5aa28250e
child 5631 cfb4f43485f3
6888130: SwingSet2: Demo is not launching and throwing NPE. Reviewed-by: prr
jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
--- a/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Tue Jun 01 21:36:00 2010 -0700
+++ b/jdk/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Mon Jun 07 15:35:36 2010 -0700
@@ -3527,7 +3527,9 @@
                 Integer index = (Integer) e.getNewValue();
                 // remove the current index
                 // to let updateHtmlViews() insert the correct one
-                htmlViews.removeElementAt(index);
+                if (htmlViews != null) {
+                    htmlViews.removeElementAt(index);
+                }
                 updateHtmlViews(index);
             } else if (name == "tabLayoutPolicy") {
                 BasicTabbedPaneUI.this.uninstallUI(pane);