Changeset 19798

Show
Ignore:
Timestamp:
10.06.2009 16:05:34 (10 years ago)
Author:
kjdon
Message:

check whether levels is null before iterating through it

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/cdm/TranslationView.java

    r18533 r19798  
    9696    // Add the levels, if any 
    9797    ArrayList levels = CollectionDesignManager.index_manager.getLevels(); 
    98     int levels_size = levels.size(); 
    99     for (int j=0; j<levels.size(); j++) { 
     98    if (levels !=null) { 
     99      int levels_size = levels.size(); 
     100      for (int j=0; j<levels.size(); j++) { 
    100101        Object bob = new BobTheMagicalComparableWrapper(levels.get(j)); 
    101102        if(!features_model.contains(bob)) { 
    102103          features_model.add(bob); 
    103104        } 
    104     } 
    105        
     105      } 
     106    } 
    106107    // We also add subindexes. 
    107108    ArrayList subindexes = CollectionDesignManager.subcollectionindex_manager.getSubcollectionIndexes();