From 8f02501d28e61b5c3809c7503f4d5b3446fb5bd2 Mon Sep 17 00:00:00 2001 From: Egor Pugin Date: Sun, 7 Apr 2024 02:41:38 +0300 Subject: [PATCH] Set empty source by default. Useful for local overrides. --- src/sw/driver/target/base.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sw/driver/target/base.cpp b/src/sw/driver/target/base.cpp index 2f1f3779..ce962d43 100644 --- a/src/sw/driver/target/base.cpp +++ b/src/sw/driver/target/base.cpp @@ -186,6 +186,9 @@ Target::Target(TargetBase &parent, const PackageId &pkg) if (auto t0 = dynamic_cast(&parent)) source = t0->source ? t0->source->clone() : nullptr; + // set as default source to prevent missing source errors + if (!source) + source = std::make_unique(); // sdir if (!isLocal())