From 0cb938299e58703c70d0196f4b3dee441a6416a7 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 4 Mar 2021 23:25:03 +0200 Subject: [PATCH] Add a missing symmetry to linking variables This caused invalid memory accesses when destroying syntax trees. --- source/glsl/generate.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.45.2