From 21d12900fd08b7c2e33626803d094f44f269ae19 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Thu, 13 Oct 2022 13:59:37 +0200 Subject: Fix couple of corner cases in public/private variable model --- libbuild2/variable.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libbuild2/variable.hxx') 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 (*this); } -- cgit v1.1