]> git.tdb.fi Git - libs/gl.git/commitdiff
Fix a block management error in FunctionInliner
authorMikko Rasa <tdb@tdb.fi>
Wed, 3 Mar 2021 10:41:15 +0000 (12:41 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 3 Mar 2021 15:28:53 +0000 (17:28 +0200)
source/glsl/optimize.cpp

index 8d3eca9e1f92841c2ca35346d7407a58e82fd394..08455c8ac61412d71fb8cfbb684c857f6a883169 100644 (file)
@@ -199,6 +199,7 @@ void FunctionInliner::visit_and_inline(RefPtr<Expression> &ptr)
 
 void FunctionInliner::visit(Block &block)
 {
+       SetForScope<Block *> set_block(current_block, &block);
        SetForScope<NodeList<Statement>::iterator> save_insert_point(insert_point, block.body.begin());
        for(NodeList<Statement>::iterator i=block.body.begin(); i!=block.body.end(); ++i)
        {