Fix crash searchbar's suggestions

The suggestion's list was filled without checking if the current suggestion
was wrong which caused crash in this case.
This commit is contained in:
luddens 2019-06-03 14:36:13 +02:00 committed by Matthieu Gautier
parent 15f7eaa400
commit df76db4f47
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());