forked from openkylin/ukui-search
解决文件内容搜索详情页获取数据时偶现的崩溃问题
This commit is contained in:
parent
96789c6d71
commit
bf7df71c26
|
@ -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