Empty path should yield nullptr Partition.
This commit is contained in:
parent
24c1bf429e
commit
7d5795a6fd
@ -83,6 +83,9 @@ findPartitionByMountPoint( const QList< Device* >& devices, const QString& mount
|
||||
Partition*
|
||||
findPartitionByPath( const QList< Device* >& devices, const QString& path )
|
||||
{
|
||||
if ( path.simplified().isEmpty() )
|
||||
return nullptr;
|
||||
|
||||
for ( auto device : devices )
|
||||
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
|
||||
if ( ( *it )->partitionPath() == path.simplified() )
|
||||
|
Loading…
Reference in New Issue
Block a user