From 770678e32a2f5a443676574d21cc1a54a090aa3b Mon Sep 17 00:00:00 2001 From: John Preston Date: Mon, 10 Feb 2020 15:58:58 +0400 Subject: [PATCH] Fix crash in updates handling. --- Telegram/SourceFiles/mainwidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); } }