logic: fix crash when using codeblocks project (issue #1109) (#1110)

This commit is contained in:
William Wold
2020-11-18 16:47:14 +01:00
committed by GitHub
parent 8990eb320d
commit 4b6b58de86
@@ -58,7 +58,12 @@ std::shared_ptr<Target> Target::create(const TiXmlElement* element)
{
const TiXmlElement* compilerElement = element->FirstChildElement(
Compiler::getXmlElementName().c_str());
target->m_compiler = Compiler::create(compilerElement);
std::shared_ptr<Compiler> compiler = Compiler::create(compilerElement);
if (!compiler)
{
return std::shared_ptr<Target>();
}
target->m_compiler = compiler;
}
return target;