Skip to content
Snippets Groups Projects
Commit c456ce6e authored by Emmanuel Lepage Vallee's avatar Emmanuel Lepage Vallee
Browse files

[ #36988 ] Double check semi-valid contactproxymodel indexes

parent f26e5e93
No related branches found
No related tags found
No related merge requests found
...@@ -417,6 +417,7 @@ QModelIndex ContactProxyModel::index( int row, int column, const QModelIndex& pa ...@@ -417,6 +417,7 @@ QModelIndex ContactProxyModel::index( int row, int column, const QModelIndex& pa
switch(parentNode->type()) { switch(parentNode->type()) {
case CategorizedCompositeNode::Type::TOP_LEVEL: { case CategorizedCompositeNode::Type::TOP_LEVEL: {
TopLevelItem* tld = static_cast<TopLevelItem*>(parentNode); TopLevelItem* tld = static_cast<TopLevelItem*>(parentNode);
if (tld && row < tld->m_lChildren.size())
return createIndex(row,column,(void*)tld->m_lChildren[row]); return createIndex(row,column,(void*)tld->m_lChildren[row]);
} }
break; break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment