diff --git a/td/telegram/AnimationsManager.cpp b/td/telegram/AnimationsManager.cpp index 9316fff1..467d9de3 100644 --- a/td/telegram/AnimationsManager.cpp +++ b/td/telegram/AnimationsManager.cpp @@ -605,7 +605,10 @@ int32 AnimationsManager::get_saved_animations_hash(const char *source) const { CHECK(animation != nullptr); auto file_view = td_->file_manager_->get_file_view(animation_id); CHECK(file_view.has_remote_location()); - LOG_CHECK(file_view.remote_location().is_document()) << source << " " << file_view.remote_location(); + if (!file_view.remote_location().is_document()) { + LOG(ERROR) << "Saved animation remote location is not document: " << source << " " << file_view.remote_location(); + continue; + } auto id = static_cast(file_view.remote_location().get_id()); numbers.push_back(static_cast(id >> 32)); numbers.push_back(static_cast(id & 0xFFFFFFFF)); diff --git a/td/telegram/StickersManager.cpp b/td/telegram/StickersManager.cpp index f47d3200..0c5a54cf 100644 --- a/td/telegram/StickersManager.cpp +++ b/td/telegram/StickersManager.cpp @@ -4214,8 +4214,10 @@ int32 StickersManager::get_recent_stickers_hash(const vector &sticker_id CHECK(sticker != nullptr); auto file_view = td_->file_manager_->get_file_view(sticker_id); CHECK(file_view.has_remote_location()); - CHECK(file_view.remote_location().is_document()); - CHECK(!file_view.remote_location().is_web()); + if (!file_view.remote_location().is_document()) { + LOG(ERROR) << "Recent sticker remote location is not document: " << file_view.remote_location(); + continue; + } auto id = static_cast(file_view.remote_location().get_id()); numbers.push_back(static_cast(id >> 32)); numbers.push_back(static_cast(id & 0xFFFFFFFF));