mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
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:
committed by
Matthieu Gautier
parent
15f7eaa400
commit
df76db4f47
@ -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());
|
||||
|
Reference in New Issue
Block a user