diff --git a/Telegram/SourceFiles/history.cpp b/Telegram/SourceFiles/history.cpp index 28854b397..2504c9c45 100644 --- a/Telegram/SourceFiles/history.cpp +++ b/Telegram/SourceFiles/history.cpp @@ -1987,12 +1987,7 @@ void History::addOlderSlice(const QVector &slice, const QVectortype() == HistoryItemGroup && prev->type() == HistoryItemGroup) { static_cast(prev)->uniteWith(static_cast(till)); - till->detach(); - delete till; - if (blocks.front()->items.isEmpty()) { - delete blocks.front(); - blocks.pop_front(); - } + till->destroy(); till = blocks.isEmpty() ? 0 : blocks.front()->items.front(); } if (till && prev && prev->date.date() != till->date.date()) {