forked from qt-creator/qt-creator
Nim: Avoid deref of null_ptr
Change-Id: I1ab95285d6a96844d894dc2fa5abe8bbcb1944d4 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
committed by
Tobias Hunger
parent
de0b077443
commit
de006655e3
@@ -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.")));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user