diff options
Diffstat (limited to 'libbuild2/scope.ixx')
-rw-r--r-- | libbuild2/scope.ixx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libbuild2/scope.ixx b/libbuild2/scope.ixx index a3a417f..01d239b 100644 --- a/libbuild2/scope.ixx +++ b/libbuild2/scope.ixx @@ -162,8 +162,11 @@ namespace build2 inline const project_name& project (const scope& rs) { - auto l (rs[rs.ctx.var_project]); - return l ? cast<project_name> (l) : empty_project_name; + assert (rs.root_extra != nullptr && rs.root_extra->project); + + return *rs.root_extra->project != nullptr + ? **rs.root_extra->project + : empty_project_name; } inline const project_name& |