diff --git a/td/telegram/MessagesManager.cpp b/td/telegram/MessagesManager.cpp index a46e63bc2..ea3a9ecaa 100644 --- a/td/telegram/MessagesManager.cpp +++ b/td/telegram/MessagesManager.cpp @@ -8093,6 +8093,7 @@ void MessagesManager::process_pts_update(tl_object_ptr &&u default: UNREACHABLE(); } + update_ptr = nullptr; CHECK(!td_->updates_manager_->running_get_difference()); } diff --git a/td/telegram/UpdatesManager.cpp b/td/telegram/UpdatesManager.cpp index 34334c91b..fee041b45 100644 --- a/td/telegram/UpdatesManager.cpp +++ b/td/telegram/UpdatesManager.cpp @@ -2301,8 +2301,10 @@ void UpdatesManager::process_updates(vector> } process_pts_update(std::move(update)); + CHECK(update == nullptr); } else if (is_qts_update(update.get())) { process_qts_update(std::move(update), 0, get_promise()); + CHECK(update == nullptr); } else if (update->get_id() == telegram_api::updateChannelTooLong::ID) { td_->messages_manager_->on_update_channel_too_long( move_tl_object_as(update), true); @@ -2331,6 +2333,7 @@ void UpdatesManager::process_pts_update(tl_object_ptr &&up if (!check_pts_update(update)) { LOG(ERROR) << "Receive wrong pts update: " << oneline(to_string(update)); + update = nullptr; return; }