From 63e2c029940ce8d2af9bfe5452efe7e695b674ee Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 21 Oct 2021 13:39:25 +0200 Subject: Skip NULL entries in BMI's prerequisite_targets when looking for source Fixes GitHub issue #169. --- libbuild2/cc/pkgconfig.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libbuild2') diff --git a/libbuild2/cc/pkgconfig.cxx b/libbuild2/cc/pkgconfig.cxx index 151473d..1b200b2 100644 --- a/libbuild2/cc/pkgconfig.cxx +++ b/libbuild2/cc/pkgconfig.cxx @@ -1838,7 +1838,7 @@ namespace build2 const target* mt (nullptr); for (const target* t: pt->prerequisite_targets[a]) { - if ((mt = t->is_a (*x_mod))) + if (t != nullptr && (mt = t->is_a (*x_mod))) break; } -- cgit v1.1