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

Merge pull request #5738

bodwok (1):
      fix(search): application crash when starting a search
This commit is contained in:
sudden6 2019-07-03 10:26:44 +02:00
commit 033c49aac3
No known key found for this signature in database
GPG Key ID: 279509B499E032B9

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;
}