2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Fix possible crash in scheduled messages.

This commit is contained in:
John Preston
2019-09-27 18:49:49 +03:00
parent d17f21c10d
commit 09547bd6d5

View File

@@ -193,13 +193,7 @@ void ScheduledMessages::removeSending(not_null<HistoryItem*> item) {
Expects(item->isSending() || item->hasFailed());
Expects(item->isScheduled());
const auto history = item->history();
auto &list = _data[history];
Assert(!list.itemById.contains(item->id));
Assert(!list.idByItem.contains(item));
list.items.erase(
ranges::remove(list.items, item.get(), &OwnedItem::get),
end(list.items));
item->destroy();
}
rpl::producer<> ScheduledMessages::updates(not_null<History*> history) {