From c11fc3a4d2f45ef1da1c102b3a68d9ff44077893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20G=C3=A2teau?= Date: Thu, 10 Jul 2014 18:27:37 +0200 Subject: [PATCH] Do not crash if a device does not have a partition table --- src/modules/partition/PartitionModel.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/partition/PartitionModel.cpp b/src/modules/partition/PartitionModel.cpp index b72d9d14a..7841c467b 100644 --- a/src/modules/partition/PartitionModel.cpp +++ b/src/modules/partition/PartitionModel.cpp @@ -125,6 +125,10 @@ PartitionModel::data( const QModelIndex& index, int role ) const void PartitionModel::fillPartitionList( PartitionNode* parent ) { + if ( !parent ) + { + return; + } for ( auto partition : parent->children() ) { m_partitionList << partition;