From c65f5ee3c277a449e52be45236f562aa2e8e735e Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Fri, 12 Apr 2019 11:16:35 +0200 Subject: [PATCH] ProjectExplorer: Avoid nullptr access The path chooser for the compiler command is initialized only for manually defined compilers. Skip the call to apply() on the options page when processing auto-detected toolchains to avoid a crash. Change-Id: Ib795d233f0372ef74e42b323544b0bbd95c27646 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/toolchainoptionspage.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp index d887d78461b..a7a780edd39 100644 --- a/src/plugins/projectexplorer/toolchainoptionspage.cpp +++ b/src/plugins/projectexplorer/toolchainoptionspage.cpp @@ -463,7 +463,7 @@ void ToolChainOptionsWidget::apply() for (TreeItem *item : *parent) { auto tcItem = static_cast(item); Q_ASSERT(tcItem->toolChain); - if (tcItem->widget) + if (!tcItem->toolChain->isAutoDetected() && tcItem->widget) tcItem->widget->apply(); tcItem->changed = false; tcItem->update();