]> git.tdb.fi Git - libs/gl.git/commitdiff
Clear previous state when resolving functions
authorMikko Rasa <tdb@tdb.fi>
Mon, 1 Mar 2021 23:17:01 +0000 (01:17 +0200)
committerMikko Rasa <tdb@tdb.fi>
Mon, 1 Mar 2021 23:29:35 +0000 (01:29 +0200)
source/glsl/generate.cpp

index 13f67d8cade070a4349bb2335080b27d1a2c790c..842ca4f6cdd5ab1f68bb47b3bb657490b9bb9d6a 100644 (file)
@@ -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);