Do not crash if a device does not have a partition table

main
Aurélien Gâteau 11 years ago
parent b1ce4afc8c
commit c11fc3a4d2

@ -125,6 +125,10 @@ PartitionModel::data( const QModelIndex& index, int role ) const
void void
PartitionModel::fillPartitionList( PartitionNode* parent ) PartitionModel::fillPartitionList( PartitionNode* parent )
{ {
if ( !parent )
{
return;
}
for ( auto partition : parent->children() ) for ( auto partition : parent->children() )
{ {
m_partitionList << partition; m_partitionList << partition;

Loading…
Cancel
Save