Check if fileSystem pointer is nullptr before trying to read used space
Hopefully it fixes the following crashes as well: BUG: 364863 BUG: 365872
This commit is contained in:
parent
f948569fef
commit
4ed3ce6267
|
@ -176,6 +176,9 @@ QString Partition::deviceNode() const
|
|||
/** @return the sectors used in the Partition's FileSystem or, in case of an extended partition, the sum of used sectors of the Partition's children */
|
||||
qint64 Partition::sectorsUsed() const
|
||||
{
|
||||
if (m_FileSystem == nullptr)
|
||||
return -1;
|
||||
|
||||
if (!roles().has(PartitionRole::Extended))
|
||||
return fileSystem().sectorsUsed();
|
||||
|
||||
|
|
Loading…
Reference in New Issue