diff options
author | Christian Stenger <christian.stenger@qt.io> | 2019-04-12 11:16:35 +0200 |
---|---|---|
committer | Christian Stenger <christian.stenger@qt.io> | 2019-04-16 10:02:35 +0000 |
commit | c65f5ee3c277a449e52be45236f562aa2e8e735e (patch) | |
tree | f17a96010e4043ac714fddf87367546320a435e0 /src/plugins/projectexplorer/toolchainoptionspage.cpp | |
parent | a5ee354b193f7e7bcf91907ccc156ef080d82456 (diff) |
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 <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer/toolchainoptionspage.cpp')
-rw-r--r-- | src/plugins/projectexplorer/toolchainoptionspage.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/toolchainoptionspage.cpp b/src/plugins/projectexplorer/toolchainoptionspage.cpp index d887d78461..a7a780edd3 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<ToolChainTreeItem *>(item); Q_ASSERT(tcItem->toolChain); - if (tcItem->widget) + if (!tcItem->toolChain->isAutoDetected() && tcItem->widget) tcItem->widget->apply(); tcItem->changed = false; tcItem->update(); |