aboutsummaryrefslogtreecommitdiff
path: root/libbuild2/variable.hxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-10-13 13:59:37 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-10-13 13:59:37 +0200
commit21d12900fd08b7c2e33626803d094f44f269ae19 (patch)
treefa305a675c0a91a95d94ff74d726d651afc6f230 /libbuild2/variable.hxx
parente9e9c5c20f70367ce33e023455c7080186e615e2 (diff)
Fix couple of corner cases in public/private variable model
Diffstat (limited to 'libbuild2/variable.hxx')
-rw-r--r--libbuild2/variable.hxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/libbuild2/variable.hxx b/libbuild2/variable.hxx
index cc4792e..b281844 100644
--- a/libbuild2/variable.hxx
+++ b/libbuild2/variable.hxx
@@ -1420,12 +1420,12 @@ namespace build2
variable_pool& operator= (const variable_pool&) = delete;
public:
- // RW access (only for shared pools).
+ // RW access (only for shared pools plus the temp_scope special case).
//
variable_pool&
rw () const
{
- assert (shared_->phase == run_phase::load);
+ assert (shared_ == nullptr || shared_->phase == run_phase::load);
return const_cast<variable_pool&> (*this);
}