MesonPM: Only set tools if possible

Avoids triggering a soft assert.

Change-Id: I86dd6fd3876504abc3ecf5b543e7c86d886bb4c2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Stenger
2022-10-26 08:35:00 +02:00
parent 09047d5a99
commit c392cb8acf

View File

@@ -61,6 +61,8 @@ void ToolKitAspectWidget::removeTool(const MesonTools::Tool_t &tool)
void ToolKitAspectWidget::setCurrentToolIndex(int index)
{
if (m_toolsComboBox->count() == 0)
return;
const Utils::Id id = Utils::Id::fromSetting(m_toolsComboBox->itemData(index));
if (m_type == ToolType::Meson)
MesonToolKitAspect::setMesonTool(m_kit, id);