[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.
main
Adriaan de Groot 6 years ago
parent 2ce2b08027
commit 3bdbfe6bff

@ -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,

Loading…
Cancel
Save