forked from qt-creator/qt-creator
Designer: Fix crash for CMake projects without cmake configured
When using the Wizard to configure a project using a Kit that doesn't have a CMake tool configured Qt Creator would crash. Fixes: QTCREATORBUG-32490 Change-Id: I16e0bb3d91e008f41ce55ef92b28ce92bbcbd6e6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -94,7 +94,8 @@ static void reportRenamingError(const QString &oldName, const QString &reason)
|
||||
|
||||
static std::optional<QVersionNumber> qtVersionFromProject(const Project *project)
|
||||
{
|
||||
if (const auto *kit = project->activeKit(); kit->isValid()) {
|
||||
const auto *kit = project->activeKit();
|
||||
if (kit && kit->isValid()) {
|
||||
if (const auto *qtVersion = QtSupport::QtKitAspect::qtVersion(kit))
|
||||
return qtVersion->qtVersion();
|
||||
}
|
||||
|
Reference in New Issue
Block a user