diff --git a/Telegram/SourceFiles/mainwidget.cpp b/Telegram/SourceFiles/mainwidget.cpp index 4dfd75199..31525f415 100644 --- a/Telegram/SourceFiles/mainwidget.cpp +++ b/Telegram/SourceFiles/mainwidget.cpp @@ -3807,8 +3807,8 @@ void MainWidget::feedUpdates(const MTPUpdates &updates, uint64 randomId) { : nullptr; }; if (const auto id = owner.messageIdByRandomId(randomId)) { - if (const auto local = owner.message(id); - local->isScheduled()) { + const auto local = owner.message(id); + if (local && local->isScheduled()) { owner.scheduledMessages().sendNowSimpleMessage(d, local); } }