diff --git a/glslang/MachineIndependent/ParseHelper.cpp b/glslang/MachineIndependent/ParseHelper.cpp index c5f0e63f..6351997a 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(); } }