[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:
parent
2ce2b08027
commit
3bdbfe6bff
@ -1027,7 +1027,8 @@ ChoicePage::updateActionChoicePreview( ChoicePage::InstallChoice choice )
|
|||||||
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset,
|
connect( m_core->bootLoaderModel(), &QAbstractItemModel::modelReset,
|
||||||
[ this ]()
|
[ 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,
|
connect( m_core, &PartitionCoreModule::deviceReverted, this,
|
||||||
|
Loading…
Reference in New Issue
Block a user