Fix crash when clearing empty timeline
This commit is contained in:
parent
3758c42ed6
commit
d112d6b11f
@ -3182,9 +3182,11 @@ Cache::clearTimeline(const std::string &room_id)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
if (!start) {
|
||||||
lmdb::cursor_del(msgCursor);
|
do {
|
||||||
} while (msgCursor.get(indexVal, val, MDB_PREV));
|
lmdb::cursor_del(msgCursor);
|
||||||
|
} while (msgCursor.get(indexVal, val, MDB_PREV));
|
||||||
|
}
|
||||||
|
|
||||||
cursor.close();
|
cursor.close();
|
||||||
msgCursor.close();
|
msgCursor.close();
|
||||||
|
Loading…
Reference in New Issue
Block a user