NPE eliminated. BLD200404211800
authorpkuzel@netbeans.org
Wed, 21 Apr 2004 15:36:44 +0000
changeset 4446e9b5a489e4a4
parent 4445 7ed58c885365
child 4447 8d83741261ca
NPE eliminated.
tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceTasksView.java
     1.1 --- a/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceTasksView.java	Wed Apr 21 14:50:48 2004 +0000
     1.2 +++ b/tasklist.docscan/src/org/netbeans/modules/tasklist/docscan/SourceTasksView.java	Wed Apr 21 15:36:44 2004 +0000
     1.3 @@ -1318,9 +1318,10 @@
     1.4          }
     1.5      }
     1.6  
     1.7 +    // handle select folder life-time
     1.8      static Node icons = null;
     1.9  
    1.10 -    /** Logical view over project */
    1.11 +    /** Logical view over opened projects */
    1.12      private Node projectView() {
    1.13  
    1.14          Children kids = new Children.Array();
    1.15 @@ -1387,12 +1388,20 @@
    1.16  
    1.17          public Image getIcon(int type) {
    1.18              // XXX how to dynamically get icon (that is subject to L&F)
    1.19 -            return icons.getIcon(type);
    1.20 +            if (icons != null) {
    1.21 +                return icons.getIcon(type);
    1.22 +            } else {
    1.23 +                return super.getIcon(type);
    1.24 +            }
    1.25          }
    1.26  
    1.27          public Image getOpenedIcon(int type) {
    1.28              // XXX how to dynamically get icon (that is subject to L&F)
    1.29 -            return icons.getOpenedIcon(type);
    1.30 +            if (icons != null) {
    1.31 +                return icons.getOpenedIcon(type);
    1.32 +            } else {
    1.33 +                return super.getOpenedIcon(type);
    1.34 +            }
    1.35          }
    1.36  
    1.37          private static class FolderContent extends Children.Keys {