Changeset 14706

Show
Ignore:
Timestamp:
17.10.2007 16:53:00 (12 years ago)
Author:
shaoqun
Message:

Fixed NULL pointer exception when closing a collection

Files:
1 modified

Legend:

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

    r14359 r14706  
    6767         
    6868        is_classifier = element.getParentNode().getNodeName().equals(StaticStrings.CLASSIFY_ELEMENT); 
    69          
    70         if(is_classifier) { 
     69 
     70    if(is_classifier && CollectionDesignManager.classifier_manager!=null) { 
    7171            //The getClassifierPosition() method also sets the classifier_options variable. 
    7272            feature_name = Classifier.CLASSIFIER_PREFIX + getClassifierPosition(element);    
    7373            Classifier classifier = getClassifier(feature_name); 
    7474            //set the classifier_options string 
    75             classifier_options = classifier.toString(); 
    76  
     75        if (classifier != null){ 
     76        classifier_options = classifier.toString(); 
     77        } 
    7778                     
    7879            pure_format = toOneLineFormat(XMLTools.getNodeText(element));