Don't crash in UserListModel when there is no room

BUG: 466045
This commit is contained in:
Tobias Fella
2023-03-22 20:43:23 +01:00
parent 493e27622f
commit 34ad743e98

View File

@@ -217,6 +217,9 @@ int UserListModel::findUserPos(Quotient::User *user) const
int UserListModel::findUserPos(const QString &username) const
{
if (!m_currentRoom) {
return 0;
}
return m_currentRoom->memberSorter().lowerBoundIndex(m_users, username);
}