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:
parent
e7e6bff318
commit
77d55d5d7d
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user