X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fdebug.cpp;h=06bf1925cea7e4102015f999cd198d3b67f4615c;hb=0c07531f8ec779edde9ebe765b3cd79a6960b838;hp=04d7aac8ca2c442755efcc1c376f103e6fd3220d;hpb=19a24f859cd7fcf581442319499ae24b3e7385a4;p=libs%2Fgl.git diff --git a/source/glsl/debug.cpp b/source/glsl/debug.cpp index 04d7aac8..06bf1925 100644 --- a/source/glsl/debug.cpp +++ b/source/glsl/debug.cpp @@ -312,10 +312,10 @@ void DumpTree::visit(FunctionDeclaration &func) for(NodeArray::const_iterator i=func.parameters.begin(); i!=func.parameters.end(); ++i) (*i)->visit(*this); last_branch(); - if(func.definition!=&func) - append(format("Definition: %%%d", get_label(*func.definition))); - else + if(func.definition==&func) func.body.visit(*this); + else if(func.definition) + append(format("Definition: %%%d", get_label(*func.definition))); end_sub(); }