From df76db4f47c4d6ab3431bc52b940316724848956 Mon Sep 17 00:00:00 2001 From: luddens Date: Mon, 3 Jun 2019 14:36:13 +0200 Subject: [PATCH] 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. --- src/reader.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/reader.cpp b/src/reader.cpp index 7422991f7..45e2d5108 100644 --- a/src/reader.cpp +++ b/src/reader.cpp @@ -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 suggestion; suggestion.push_back(current->getTitle()); suggestion.push_back("/A/" + current->getUrl());