Do not dereference a nullptr.

main
Teo Mrnjavac 10 years ago
parent 166f4dd097
commit d96cfb725b

@ -100,6 +100,8 @@ PartitionModel::parent( const QModelIndex& child ) const
if ( !child.isValid() )
return QModelIndex();
Partition* partition = partitionForIndex( child );
if ( !partition )
return QModelIndex();
PartitionNode* parentNode = partition->parent();
if ( parentNode == m_device->partitionTable() )
return QModelIndex();

Loading…
Cancel
Save