changeset 2421:962608ee8cdb

6888130: SwingSet2: Demo is not launching and throwing NPE. Reviewed-by: prr
author lana
date Mon, 07 Jun 2010 15:35:36 -0700
parents 31a7a323a604
children 7140b5759b63
files src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/swing/plaf/basic/BasicTabbedPaneUI.java	Tue Jun 01 21:36:00 2010 -0700
+++ b/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);