forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user