mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 23:27:09 +02:00
Fix possible crash in scheduled messages.
This commit is contained in:
parent
d17f21c10d
commit
09547bd6d5
1 changed files with 1 additions and 7 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue