forked from qt-creator/qt-creator
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:
@@ -61,6 +61,8 @@ void ToolKitAspectWidget::removeTool(const MesonTools::Tool_t &tool)
|
|||||||
|
|
||||||
void ToolKitAspectWidget::setCurrentToolIndex(int index)
|
void ToolKitAspectWidget::setCurrentToolIndex(int index)
|
||||||
{
|
{
|
||||||
|
if (m_toolsComboBox->count() == 0)
|
||||||
|
return;
|
||||||
const Utils::Id id = Utils::Id::fromSetting(m_toolsComboBox->itemData(index));
|
const Utils::Id id = Utils::Id::fromSetting(m_toolsComboBox->itemData(index));
|
||||||
if (m_type == ToolType::Meson)
|
if (m_type == ToolType::Meson)
|
||||||
MesonToolKitAspect::setMesonTool(m_kit, id);
|
MesonToolKitAspect::setMesonTool(m_kit, id);
|
||||||
|
|||||||
Reference in New Issue
Block a user