From: Mikko Rasa Date: Thu, 4 Mar 2021 21:25:03 +0000 (+0200) Subject: Add a missing symmetry to linking variables X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=0cb938299e58703c70d0196f4b3dee441a6416a7;p=libs%2Fgl.git Add a missing symmetry to linking variables This caused invalid memory accesses when destroying syntax trees. --- diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index ad8515a9..b91c2e26 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -558,7 +558,10 @@ void InterfaceGenerator::visit(VariableDeclaration &var) const map &linked_vars = iface_block->linked_block->members.variables; map::const_iterator i = linked_vars.find(var.name); if(i!=linked_vars.end()) + { var.linked_declaration = i->second; + var.linked_declaration->linked_declaration = &var; + } } return; }