Show
Ignore:
Timestamp:
19.10.2015 09:50:19 (4 years ago)
Author:
kjdon
Message:

asking for cl=CL2.pr caused a segfault. So add in a check for empty doctype before testing its value. Found and fixed thanks to DL Consulting

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/recpt/receptionist.cpp

    r28912 r30307  
    13651365    request.filterResultOptions = FRmetadata; 
    13661366    collectproto->filter (collection, request, response, err, logout); 
    1367     // set to original value (without .xx stuff) if doctype isn't "classify" 
    1368     if (response.docInfo[0].metadata["doctype"].values[0] != "classify") 
     1367    // set to original value (without .xx stuff) if doctype isn't "classify" or if no doctype 
     1368    if (response.docInfo[0].metadata["doctype"].values.size() == 0 || response.docInfo[0].metadata["doctype"].values[0] != "classify") 
    13691369      strip_suffix (arg_cl); 
    13701370    else