src/share/classes/com/sun/java/swing/plaf/windows/WindowsTableHeaderUI.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -88,13 +88,14 @@
             this.isSelected = isSelected;
             this.hasFocus = hasFocus;
             this.column = column;
             this.hasRollover = (column == getRolloverColumn());
             if (skin == null) {
-                skin = XPStyle.getXP().getSkin(header, Part.HP_HEADERITEM);
+                XPStyle xp = XPStyle.getXP();
+                skin = (xp != null) ? xp.getSkin(header, Part.HP_HEADERITEM) : null;
             }
-            Insets margins = skin.getContentMargin();
+            Insets margins = (skin != null) ? skin.getContentMargin() : null;
             Border border = null;
             int contentTop = 0;
             int contentLeft = 0;
             int contentBottom = 0;
             int contentRight = 0;