diff options
author | Tobias Hunger <tobias.hunger@qt.io> | 2018-03-07 10:35:08 +0100 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-03-07 14:35:15 +0000 |
commit | 6e419d642a2c1e9d6f5cc334bdd58305fd01b3e5 (patch) | |
tree | a04eb067a58183327c728ad1cc58a39718cd1a92 /src/plugins/ios | |
parent | 23e48fe207d62b16ca5cef701536ce34f3c9681d (diff) | |
download | qt-creator-6e419d642a2c1e9d6f5cc334bdd58305fd01b3e5.tar.gz |
RunConfigurationFactories: Fix crash opening non-qmake based projects
Make sure the Qnx RCs only get triggered for qmake-based projects and defend
against broken set-ups using QTC_ASSERT.
Task-number: QTCREATORBUG-19755
Change-Id: If64b73de49b0199308f767151d68909dc8b1bc53
Reviewed-by: hjk <hjk@qt.io>
Diffstat (limited to 'src/plugins/ios')
-rw-r--r-- | src/plugins/ios/iosrunfactories.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/plugins/ios/iosrunfactories.cpp b/src/plugins/ios/iosrunfactories.cpp index dccf82e952..854cf45c75 100644 --- a/src/plugins/ios/iosrunfactories.cpp +++ b/src/plugins/ios/iosrunfactories.cpp @@ -62,7 +62,8 @@ bool IosRunConfigurationFactory::canCreateHelper(Target *parent, const QString & QList<BuildTargetInfo> IosRunConfigurationFactory::availableBuildTargets(Target *parent, CreationMode mode) const { - auto project = static_cast<QmakeProject *>(parent->project()); + auto project = qobject_cast<QmakeProject *>(parent->project()); + QTC_ASSERT(project, return {}); return project->buildTargets(mode, {ProjectType::ApplicationTemplate, ProjectType::SharedLibraryTemplate, ProjectType::AuxTemplate}); |