Bypass crash

This commit is contained in:
Andrea Cavalli 2022-03-19 01:58:06 +01:00
parent b791b36a30
commit 9407a7fa35

View File

@ -11194,10 +11194,11 @@ void ContactsManager::on_update_user_phone_number(User *u, UserId user_id, strin
if (u->phone_number != phone_number) { if (u->phone_number != phone_number) {
if (!u->phone_number.empty()) { if (!u->phone_number.empty()) {
auto it = resolved_phone_numbers_.find(u->phone_number); auto it = resolved_phone_numbers_.find(u->phone_number);
CHECK(it != resolved_phone_numbers_.end()); if (it != resolved_phone_numbers_.end()) {
if (it->second == user_id) { if (it->second == user_id) {
resolved_phone_numbers_.erase(it); resolved_phone_numbers_.erase(it);
} }
}
} }
u->phone_number = std::move(phone_number); u->phone_number = std::move(phone_number);