Fix possible crash in click handling.

This commit is contained in:
John Preston 2023-07-13 09:12:05 +04:00
parent ebd8380019
commit 8a974273b9
1 changed files with 1 additions and 1 deletions

View File

@ -385,7 +385,7 @@ const SponsoredMessages::Entry *SponsoredMessages::find(
}
auto &list = it->second;
const auto entryIt = ranges::find_if(list.entries, [&](const Entry &e) {
return e.item->fullId() == fullId;
return e.item && e.item->fullId() == fullId;
});
if (entryIt == end(list.entries)) {
return nullptr;