diff --git a/Source/QtDialog/QCMake.cxx b/Source/QtDialog/QCMake.cxx index eb743bc1e4..e05f3add20 100644 --- a/Source/QtDialog/QCMake.cxx +++ b/Source/QtDialog/QCMake.cxx @@ -164,7 +164,7 @@ void QCMake::setPreset(QString const& name, bool setBinary) if (!name.isNull()) { std::string presetName(name.toStdString()); - auto const& expandedPreset = + auto const expandedPreset = this->CMakePresetsGraph.ConfigurePresets[presetName].Expanded; if (expandedPreset) { if (setBinary && !expandedPreset->BinaryDir.empty()) {