From 95312044b7b474af5671eb67f9df8debf96bf54c Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 16 Oct 2021 16:53:21 +0300 Subject: [PATCH] Don't record references to null declarations --- source/glsl/optimize.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/glsl/optimize.cpp b/source/glsl/optimize.cpp index 08d92599..3cb10e86 100644 --- a/source/glsl/optimize.cpp +++ b/source/glsl/optimize.cpp @@ -1324,7 +1324,7 @@ void UnusedVariableRemover::visit(VariableReference &var) { if(composite_reference) r_reference.declaration = var.declaration; - else + else if(var.declaration) referenced(var.declaration, var); } @@ -1332,7 +1332,7 @@ void UnusedVariableRemover::visit(InterfaceBlockReference &iface) { if(composite_reference) r_reference.declaration = iface.declaration; - else + else if(iface.declaration) referenced(iface.declaration, iface); } -- 2.45.2