[partition] Avoid crash if combobox is gone and model resets

- Since the lambda is connected to the model only, it should
   check that the target combo exists as well.
This commit is contained in:
Adriaan de Groot 2019-05-31 10:56:01 +02:00
parent 2ce2b08027
commit 3bdbfe6bff

View file

@ -1027,7 +1027,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset,
[ this ]()
{
Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() );
if ( !m_bootloaderComboBox.isNull() )
Calamares::restoreSelectedBootLoader( *m_bootloaderComboBox, m_core->bootLoaderInstallPath() );
}
);
connect( m_core, &PartitionCoreModule::deviceReverted, this,