Fix possible crash in case of API error.

This commit is contained in:
John Preston 2021-06-23 14:29:38 +04:00
parent 14a2b10989
commit 03147a5426

View file

@ -2138,7 +2138,7 @@ void InnerWidget::peerSearchReceived(
} else {
LOG(("API Error: "
"user %1 was not loaded in InnerWidget::peopleReceived()"
).arg(peer->id.value));
).arg(peerFromMTP(mtpPeer).value));
}
}
for (const auto &mtpPeer : result) {
@ -2153,7 +2153,7 @@ void InnerWidget::peerSearchReceived(
} else {
LOG(("API Error: "
"user %1 was not loaded in InnerWidget::peopleReceived()"
).arg(peer->id.value));
).arg(peerFromMTP(mtpPeer).value));
}
}
refresh();