#126609 Fixing NPE.
authorPeter Zavadsky <pzavadsky@netbeans.org>
Mon, 04 Feb 2008 13:24:04 -0800
changeset 2089332f566f3309
parent 2088 e3c1a6ad62b4
child 2090 d083fab60d6f
child 2097 21ae4bbaecd1
child 2991 8d36c7777fcf
#126609 Fixing NPE.
visualweb.designer/src/org/netbeans/modules/visualweb/css2/CssBorder.java
     1.1 --- a/visualweb.designer/src/org/netbeans/modules/visualweb/css2/CssBorder.java	Fri Feb 01 15:03:12 2008 -0800
     1.2 +++ b/visualweb.designer/src/org/netbeans/modules/visualweb/css2/CssBorder.java	Mon Feb 04 13:24:04 2008 -0800
     1.3 @@ -448,6 +448,20 @@
     1.4              return null;
     1.5          }
     1.6  
     1.7 +        // XXX #126609 NPE.
     1.8 +        if (topColor == null) {
     1.9 +            topColor = getDefaultColor(element);
    1.10 +        }
    1.11 +        if (bottomColor == null) {
    1.12 +            bottomColor = getDefaultColor(element);
    1.13 +        }
    1.14 +        if (leftColor == null) {
    1.15 +            leftColor = getDefaultColor(element);
    1.16 +        }
    1.17 +        if (rightColor == null) {
    1.18 +            rightColor = getDefaultColor(element);
    1.19 +        }
    1.20 +        
    1.21          return new CssBorder(topWidth, bottomWidth, rightWidth, leftWidth, topStyle, rightStyle,
    1.22              bottomStyle, leftStyle, topColor, bottomColor, rightColor, leftColor);
    1.23      }