Merge pull request #228 from kiwix/fix-crash-suggestion

Fix crash searchbar's suggestions
This commit is contained in:
Matthieu Gautier 2019-06-24 11:54:23 +02:00 committed by GitHub
commit cfdd634c3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -772,6 +772,9 @@ bool Reader::searchSuggestionsSmart(const string& prefix,
for (auto current = suggestionSearch->begin();
current != suggestionSearch->end();
current++) {
if (!current->good()) {
continue;
}
std::vector<std::string> suggestion;
suggestion.push_back(current->getTitle());
suggestion.push_back("/A/" + current->getUrl());