Ignore constants that have not been initialized. Bug 19331817 Change-Id: Ib2d41e072306e4fb64a6e074705982982c08cdd4 Reviewed-on: https://swiftshader-review.googlesource.com/2111 Reviewed-by: Nicolas Capens <capn@google.com> Tested-by: Nicolas Capens <capn@google.com>
diff --git a/src/OpenGL/compiler/parseConst.cpp b/src/OpenGL/compiler/parseConst.cpp index d14babf..563e39b 100644 --- a/src/OpenGL/compiler/parseConst.cpp +++ b/src/OpenGL/compiler/parseConst.cpp
@@ -148,6 +148,13 @@ void TConstTraverser::visitConstantUnion(TIntermConstantUnion* node) { + if (!node->getUnionArrayPointer()) + { + // The constant was not initialized, this should already have been logged + assert(infoSink.info.size() != 0); + return; + } + ConstantUnion* leftUnionArray = unionArray; int instanceSize = type.getObjectSize(); TBasicType basicType = type.getBasicType();