Commit 0668e192 authored by Renaud Guezennec's avatar Renaud Guezennec

Fix crash on disconnect.

parent 01c6fee8
......@@ -234,7 +234,8 @@ QModelIndex PlayersList::parent(const QModelIndex& index) const
{
return QModelIndex();
}
return createIndex(parentPerson->indexOf(childItem), 0, parentPerson);
auto i = m_playersList.indexOf(dynamic_cast<Player*>(parentPerson));
return createIndex(i, 0, parentPerson);
}
int PlayersList::rowCount(const QModelIndex& parent) const
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment