解决文件内容搜索详情页获取数据时偶现的崩溃问题
This commit is contained in:
parent
888aca24eb
commit
83f1b904ad
|
@ -339,6 +339,10 @@ int FileContentSearch::getResult(Xapian::MSet &result, std::string &keyWord) {
|
|||
for(const QString& wordTobeFound : words) {
|
||||
std::string term = wordTobeFound.toStdString();
|
||||
termIterator.skip_to(term);
|
||||
if(termIterator == doc.termlist_end()) {
|
||||
termIterator = doc.termlist_begin();
|
||||
continue;
|
||||
}
|
||||
if(term == *termIterator) {
|
||||
break;
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue