From: Mikko Rasa Date: Mon, 1 Mar 2021 23:17:01 +0000 (+0200) Subject: Clear previous state when resolving functions X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=commitdiff_plain;h=2d79e7d495480251ada1bd6478339537b9799e7f Clear previous state when resolving functions --- diff --git a/source/glsl/generate.cpp b/source/glsl/generate.cpp index 13f67d8c..842ca4f6 100644 --- a/source/glsl/generate.cpp +++ b/source/glsl/generate.cpp @@ -329,10 +329,11 @@ void FunctionResolver::visit(FunctionDeclaration &func) } else { + func.definition = 0; if(!stage_decl) stage_decl = &func; - - func.definition = stage_decl->definition; + else + func.definition = stage_decl->definition; } decls.push_back(&func);