From ba5c010c590761d0321bd16e915536ef4f9aad8d Mon Sep 17 00:00:00 2001 From: Malcolm Bechard Date: Fri, 12 Jul 2024 01:06:18 -0400 Subject: [PATCH] fix crash when atomicCounter() with no args is used. --- glslang/MachineIndependent/ParseHelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index c5f0e63f1..6351997a7 100644 --- a/glslang/MachineIndependent/ParseHelper.cpp +++ b/glslang/MachineIndependent/ParseHelper.cpp @@ -7387,7 +7387,7 @@ TIntermTyped* TParseContext::vkRelaxedRemapFunctionCall(const TSourceLoc& loc, T } } else if (function->getName() == "atomicCounter") { // change atomicCounter into a direct read of the variable - if (arguments->getAsTyped()) { + if (arguments && arguments->getAsTyped()) { result = arguments->getAsTyped(); } }