diff options
author | Robert Loehning <robert.loehning@qt.io> | 2018-04-23 12:52:56 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@qt.io> | 2018-04-23 14:08:58 +0000 |
commit | de006655e334a8f3555ab9f0c7c5222e3384f30d (patch) | |
tree | 2ffefd3042532abd10ebee3c8c40f17830d4dd7e | |
parent | de0b077443f7f46ca995f46178e4e1871200905c (diff) | |
download | qt-creator-de006655e334a8f3555ab9f0c7c5222e3384f30d.tar.gz |
Nim: Avoid deref of null_ptr
Change-Id: I1ab95285d6a96844d894dc2fa5abe8bbcb1944d4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r-- | src/plugins/nim/project/nimproject.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/nim/project/nimproject.cpp b/src/plugins/nim/project/nimproject.cpp index 6ad9879469..fa5420db02 100644 --- a/src/plugins/nim/project/nimproject.cpp +++ b/src/plugins/nim/project/nimproject.cpp @@ -158,8 +158,10 @@ QList<Task> NimProject::projectIssues(const Kit *k) const { QList<Task> result = Project::projectIssues(k); auto tc = dynamic_cast<NimToolChain*>(ToolChainKitInformation::toolChain(k, Constants::C_NIMLANGUAGE_ID)); - if (!tc) + if (!tc) { result.append(createProjectTask(Task::TaskType::Error, tr("No Nim compiler set."))); + return result; + } if (!tc->compilerCommand().exists()) result.append(createProjectTask(Task::TaskType::Error, tr("Nim compiler does not exist."))); |