From 0f50f7a0f4f995a1b54af28c03c7c0af3837d0a3 Mon Sep 17 00:00:00 2001 From: levlam Date: Thu, 19 Aug 2021 08:57:01 +0300 Subject: [PATCH] Ensure that channel Dialog exists before setting retry timeout. --- td/telegram/MessagesManager.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index 65a482fa6..d29be6f8a 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -36026,6 +36026,9 @@ void MessagesManager::on_get_channel_difference( if (difference_ptr == nullptr) { bool have_access = have_input_peer(dialog_id, AccessRights::Read); if (have_access) { + if (d == nullptr) { + force_create_dialog(dialog_id, "on_get_channel_difference failed"); + } auto &delay = channel_get_difference_retry_timeouts_[dialog_id]; if (delay == 0) { delay = 1;