mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-29 02:15:36 -04:00
[partition] When flags are explicitly invalid, return early
This commit is contained in:
parent
356e13ae93
commit
87c77d9807
1 changed files with 4 additions and 0 deletions
|
@ -52,6 +52,10 @@ PartitionTable::Flags
|
||||||
flags( const Partition* partition )
|
flags( const Partition* partition )
|
||||||
{
|
{
|
||||||
auto v = partition->property( FLAGS_PROPERTY );
|
auto v = partition->property( FLAGS_PROPERTY );
|
||||||
|
if ( !v.isValid() )
|
||||||
|
{
|
||||||
|
return partition->activeFlags();
|
||||||
|
}
|
||||||
if ( v.type() == QVariant::Int )
|
if ( v.type() == QVariant::Int )
|
||||||
{
|
{
|
||||||
return static_cast< PartitionTable::Flags >( v.toInt() );
|
return static_cast< PartitionTable::Flags >( v.toInt() );
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue