From: Mikko Rasa Date: Sun, 26 Jan 2025 10:38:05 +0000 (+0200) Subject: Add null pointer check in CustomizedTool::create_target X-Git-Url: https://git.tdb.fi/?a=commitdiff_plain;h=33dc1dd8939ce1fe2161da4e8c61a35a3c6252a7;p=builder.git Add null pointer check in CustomizedTool::create_target --- diff --git a/source/lib/customizedtool.cpp b/source/lib/customizedtool.cpp index 9171996..f9fb6e0 100644 --- a/source/lib/customizedtool.cpp +++ b/source/lib/customizedtool.cpp @@ -33,7 +33,8 @@ Target *CustomizedTool::create_source(const FS::Path &p) const Target *CustomizedTool::create_target(const vector &s, const string &a) { Target *target = parent.create_target(s, a); - target->set_tool(*this); + if(target) + target->set_tool(*this); return target; }