From b94b0c01488e676bc6c64cd7743c5ff50eb15088 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Fri, 5 Mar 2021 01:50:31 +0200 Subject: [PATCH] Fix a memory error with interface blocks The changes in d72d8a9 were not applied to the interfaces map of the stage, but because those interfaces were unused anyway it only showed up when doing an AST dump. --- source/glsl/visitor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/glsl/visitor.cpp b/source/glsl/visitor.cpp index bee312fd..dad8badd 100644 --- a/source/glsl/visitor.cpp +++ b/source/glsl/visitor.cpp @@ -177,9 +177,9 @@ void NodeRemover::visit(InterfaceBlock &iface) { if(to_remove->count(&iface)) { - remove_from_map(stage->interface_blocks, iface.name, iface); + remove_from_map(stage->interface_blocks, iface.interface+iface.name, iface); if(!iface.instance_name.empty()) - remove_from_map(stage->interface_blocks, iface.instance_name, iface); + remove_from_map(stage->interface_blocks, "_"+iface.instance_name, iface); } SetFlag set_recursive(recursive_remove, recursive_remove || to_remove->count(&iface)); TraversingVisitor::visit(iface); -- 2.43.0