From 3bdbfe6bff5996ed3ffa93a646582c3077f0f689 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 31 May 2019 10:56:01 +0200 Subject: [PATCH] [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. --- src/modules/partition/gui/ChoicePage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 3a2b0c4bc..5e8260dec 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -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,