mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix crash when clearing empty timeline
This commit is contained in:
parent
3758c42ed6
commit
d112d6b11f
1 changed files with 5 additions and 3 deletions
|
@ -3182,9 +3182,11 @@ Cache::clearTimeline(const std::string &room_id)
|
|||
break;
|
||||
}
|
||||
|
||||
do {
|
||||
lmdb::cursor_del(msgCursor);
|
||||
} while (msgCursor.get(indexVal, val, MDB_PREV));
|
||||
if (!start) {
|
||||
do {
|
||||
lmdb::cursor_del(msgCursor);
|
||||
} while (msgCursor.get(indexVal, val, MDB_PREV));
|
||||
}
|
||||
|
||||
cursor.close();
|
||||
msgCursor.close();
|
||||
|
|
Loading…
Reference in a new issue