Fix crash in contacts list box global search.

Regression was introduced in f7359093b4.
This commit is contained in:
John Preston 2017-09-03 22:30:04 +03:00
parent ad41a81b66
commit c2a1cc2ae8
1 changed files with 4 additions and 1 deletions

View File

@ -329,7 +329,10 @@ void ContactsBoxController::checkForEmptyRows() {
}
std::unique_ptr<PeerListRow> ContactsBoxController::createSearchRow(not_null<PeerData*> peer) {
return createRow(peer->asUser());
if (auto user = peer->asUser()) {
return createRow(user);
}
return nullptr;
}
void ContactsBoxController::rowClicked(not_null<PeerListRow*> row) {