From 15132a398f92f1a045e88326113acbd9cb25bc3b Mon Sep 17 00:00:00 2001 From: levlam Date: Fri, 22 Dec 2023 16:48:16 +0300 Subject: [PATCH] Remove check in backgrounf parsing. --- td/telegram/BackgroundManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/BackgroundManager.cpp b/td/telegram/BackgroundManager.cpp index afe6652f0..b12855716 100644 --- a/td/telegram/BackgroundManager.cpp +++ b/td/telegram/BackgroundManager.cpp @@ -503,8 +503,8 @@ void BackgroundManager::store_background(BackgroundId background_id, LogEventSto void BackgroundManager::parse_background(BackgroundId &background_id, LogEventParser &parser) { Background background; parse(background, parser); - CHECK(background.has_new_local_id); - if (background.file_id.is_valid() != background.type.has_file() || !background.id.is_valid()) { + if (!background.has_new_local_id || background.file_id.is_valid() != background.type.has_file() || + !background.id.is_valid()) { parser.set_error(PSTRING() << "Failed to load " << background.id); background_id = BackgroundId(); return;