diff options
Diffstat (limited to 'libbuild2/target.cxx')
-rw-r--r-- | libbuild2/target.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libbuild2/target.cxx b/libbuild2/target.cxx index 2a134a4..1a72788 100644 --- a/libbuild2/target.cxx +++ b/libbuild2/target.cxx @@ -188,9 +188,10 @@ namespace build2 // Skip looking up in the ad hoc group, which is semantically the // first/primary member. // - if ((g1 = group == nullptr + const target* g (group); // Atomic. + if ((g1 = g == nullptr ? nullptr - : group->adhoc_group () ? group->group : group)) + : g->adhoc_group () ? static_cast<const target*> (g->group) : g)) { auto p (g1->vars.lookup (var)); if (p.first != nullptr) |