From de006655e334a8f3555ab9f0c7c5222e3384f30d Mon Sep 17 00:00:00 2001 From: Robert Loehning Date: Mon, 23 Apr 2018 12:52:56 +0200 Subject: [PATCH] Nim: Avoid deref of null_ptr Change-Id: I1ab95285d6a96844d894dc2fa5abe8bbcb1944d4 Reviewed-by: Tobias Hunger --- src/plugins/nim/project/nimproject.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/nim/project/nimproject.cpp b/src/plugins/nim/project/nimproject.cpp index 6ad9879469f..fa5420db023 100644 --- a/src/plugins/nim/project/nimproject.cpp +++ b/src/plugins/nim/project/nimproject.cpp @@ -158,8 +158,10 @@ QList NimProject::projectIssues(const Kit *k) const { QList result = Project::projectIssues(k); auto tc = dynamic_cast(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.")));