aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/cc
diff options
context:
space:
mode:
Diffstat (limited to 'libbuild2/cc')
-rw-r--r--libbuild2/cc/common.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/libbuild2/cc/common.cxx b/libbuild2/cc/common.cxx
index c7ca7bc..2f55dcb 100644
--- a/libbuild2/cc/common.cxx
+++ b/libbuild2/cc/common.cxx
@@ -856,7 +856,6 @@ namespace build2
}
target_lock al (a != nullptr ? lock (act, *a, true) : target_lock ());
- target_lock sl (s != nullptr ? lock (act, *s, true) : target_lock ());
if (al && al.offset == target::offset_matched)
{
@@ -864,6 +863,8 @@ namespace build2
al.unlock ();
}
+ target_lock sl (s != nullptr ? lock (act, *s, true) : target_lock ());
+
if (sl && sl.offset == target::offset_matched)
{
assert ((*s)[act].rule == &file_rule::rule_match);