diff options
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp index e59daaa0fe..6b68d47868 100644 --- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp @@ -241,7 +241,8 @@ CMakeRunConfigurationFactory::CMakeRunConfigurationFactory(QObject *parent) : QList<BuildTargetInfo> CMakeRunConfigurationFactory::availableBuildTargets(Target *parent, CreationMode) const { - CMakeProject *project = static_cast<CMakeProject *>(parent->project()); + CMakeProject *project = qobject_cast<CMakeProject *>(parent->project()); + QTC_ASSERT(project, return {}); const QStringList titles = project->buildTargetTitles(true); return Utils::transform(titles, [project](const QString &title) { BuildTargetInfo bti; |