From: Mikko Rasa Date: Thu, 4 Mar 2021 23:50:31 +0000 (+0200) Subject: Fix a memory error with interface blocks X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=b94b0c01488e676bc6c64cd7743c5ff50eb15088 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. --- 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);