Fixed strange crash with invalid model index

This commit is contained in:
2022-12-17 16:39:02 +01:00
parent a9fb3d4e52
commit 632555fa71

View File

@ -128,6 +128,8 @@ void TreeToTableProxyModel::setSourceModelAndRootIndex(QAbstractItemModel *sourc
void TreeToTableProxyModel::setRootIndex(const QModelIndex &index)
{
if (!index.isValid())
return;
Q_ASSERT(index.model() == m_sourceModel);
beginResetModel();