[partition] Avoid an assert when running Calamares as user.

This commit is contained in:
Adriaan de Groot 2019-05-31 12:27:32 +02:00
parent 1ef902a41f
commit a263381996

View File

@ -94,6 +94,10 @@ BootLoaderModel::updateInternal()
clear(); clear();
createMbrItems(); createMbrItems();
// An empty model is possible if you don't havee permissions: don't crash though.
if ( rowCount() < 1 )
return;
QString partitionText; QString partitionText;
Partition* partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/boot" ); Partition* partition = KPMHelpers::findPartitionByMountPoint( m_devices, "/boot" );
if ( partition ) if ( partition )