1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

fix(search): application crash when starting a search

This commit is contained in:
bodwok 2019-07-02 12:29:00 +03:00
parent e7e6bff318
commit 77d55d5d7d
No known key found for this signature in database
GPG Key ID: A279D059178DA7BA

View File

@ -189,6 +189,11 @@ SearchResult SessionChatLog::searchBackward(SearchPos startPos, const QString& p
// If we don't have it we'll start at the end
if (startIt == items.end()) {
if (items.empty()) {
SearchResult ret;
ret.found = false;
return ret;
}
startIt = std::prev(items.end());
startPos.numMatches = 0;
}