Fixed strange crash with invalid model index
This commit is contained in:
@ -128,6 +128,8 @@ void TreeToTableProxyModel::setSourceModelAndRootIndex(QAbstractItemModel *sourc
|
|||||||
|
|
||||||
void TreeToTableProxyModel::setRootIndex(const QModelIndex &index)
|
void TreeToTableProxyModel::setRootIndex(const QModelIndex &index)
|
||||||
{
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return;
|
||||||
Q_ASSERT(index.model() == m_sourceModel);
|
Q_ASSERT(index.model() == m_sourceModel);
|
||||||
|
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
|
Reference in New Issue
Block a user