X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fsyntax.cpp;h=bda0dd1d7b2a0d673bcea91fc1fdbab23307ce37;hb=c6d59d1b35ee981c10ee8b9870338ffbaaa23e19;hp=6c766fd758161283006de48f0cdbc09666e8d305;hpb=64d98b0b4fb3214a3ca67ab1b239c120748e8e35;p=libs%2Fgl.git diff --git a/source/glsl/syntax.cpp b/source/glsl/syntax.cpp index 6c766fd7..bda0dd1d 100644 --- a/source/glsl/syntax.cpp +++ b/source/glsl/syntax.cpp @@ -262,6 +262,12 @@ VariableDeclaration::VariableDeclaration(const VariableDeclaration &other): layout(other.layout) { } +VariableDeclaration::~VariableDeclaration() +{ + if(linked_declaration && linked_declaration->linked_declaration==this) + linked_declaration->linked_declaration = 0; +} + void VariableDeclaration::visit(NodeVisitor &visitor) { visitor.visit(*this); @@ -284,6 +290,12 @@ InterfaceBlock::InterfaceBlock(const InterfaceBlock &other): linked_block(0) { } +InterfaceBlock::~InterfaceBlock() +{ + if(linked_block && linked_block->linked_block==this) + linked_block->linked_block = 0; +} + void InterfaceBlock::visit(NodeVisitor &visitor) { visitor.visit(*this);