mirror of
https://github.com/KhronosGroup/glslang
synced 2024-11-08 19:40:06 +00:00
Handle potentially uninitialized result
This commit is contained in:
parent
d509a5eec6
commit
70661b9c08
@ -7302,6 +7302,10 @@ spv::Id TGlslangToSpvTraverser::createSpvConstant(const glslang::TIntermTyped& n
|
||||
} else if (auto* const_union_array = &sn->getConstArray()) {
|
||||
int nextConst = 0;
|
||||
result = createSpvConstantFromConstUnionArray(sn->getType(), *const_union_array, nextConst, true);
|
||||
} else {
|
||||
logger->missingFunctionality("Invalid initializer for spec onstant.");
|
||||
exit(1);
|
||||
return spv::NoResult;
|
||||
}
|
||||
builder.addName(result, sn->getName().c_str());
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user