Skip to content

Commit

Permalink
Conceal some rare crash on start
Browse files Browse the repository at this point in the history
Sometimes Psi crashes on start on readding MUC cntacts to roster.
Quite likely it's about readding contacts which were previously
remembered in accounts.xml or wherever the roster cached.
  • Loading branch information
Ri0n committed Dec 14, 2024
1 parent 84fb444 commit 444d8e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/contactlistmodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,9 +320,11 @@ void ContactListModel::Private::addContact(PsiContact *contact)

void ContactListModel::Private::removeContact(PsiContact *contact)
{
Q_ASSERT(monitoredContacts.contains(contact));
if (!monitoredContacts.contains(contact))
// Q_ASSERT(monitoredContacts.contains(contact));
if (!monitoredContacts.contains(contact)) {
qWarning("contact %s is not monitored", qUtf8Printable(contact->jid().full()));
return;
}

while (monitoredContacts.contains(contact)) {
QModelIndex index = monitoredContacts.take(contact);
Expand Down

0 comments on commit 444d8e2

Please sign in to comment.