Handle potentially uninitialized result
diff --git a/SPIRV/GlslangToSpv.cpp b/SPIRV/GlslangToSpv.cpp
index 632a217..f0da850 100755
--- a/SPIRV/GlslangToSpv.cpp
+++ b/SPIRV/GlslangToSpv.cpp
@@ -7302,6 +7302,10 @@
} 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;