解决文件内容搜索详情页获取数据时偶现的崩溃问题

This commit is contained in:
iaom 2022-11-30 16:19:18 +08:00
parent f8fc180762
commit d7aa73bc4b
1 changed files with 4 additions and 0 deletions

View File

@ -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 {