From 3880c3dd8670cc4a7ea5d4bd354c4f26f0278785 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 26 Apr 2018 18:22:43 +0200 Subject: Fix bug in backlinking test --- build2/algorithm.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build2/algorithm.cxx b/build2/algorithm.cxx index a3f4d0a..6f756e4 100644 --- a/build2/algorithm.cxx +++ b/build2/algorithm.cxx @@ -1070,15 +1070,16 @@ namespace build2 if (!t.out.empty () || !t.is_a ()) return false; - // An in-src configuration cannot be forwarded. + // Neither an out-of-project nor in-src configuration can be forwarded. // const scope& bs (t.base_scope ()); - if (bs.src_path () == bs.out_path ()) + const scope* rs (bs.root_scope ()); + if (rs == nullptr || bs.src_path () == bs.out_path ()) return false; // Only for forwarded configurations. // - if (!cast_false (bs.root_scope ()->vars[var_forwarded])) + if (!cast_false (rs->vars[var_forwarded])) return false; lookup l (t[var_backlink]); -- cgit v1.1