Commit d0bfd915 by Nicolas Capens

Fix null dereference on uninitialized loop variable.

Bug swiftshader:52 Change-Id: I972c769551acf19898f10579685f45f3192612c4 Reviewed-on: https://swiftshader-review.googlesource.com/9810Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent ec92f3cd
...@@ -3521,7 +3521,7 @@ namespace glsl ...@@ -3521,7 +3521,7 @@ namespace glsl
{ {
TIntermBinary *assign = variable->getAsBinaryNode(); TIntermBinary *assign = variable->getAsBinaryNode();
if(assign->getOp() == EOpInitialize) if(assign && assign->getOp() == EOpInitialize)
{ {
TIntermSymbol *symbol = assign->getLeft()->getAsSymbolNode(); TIntermSymbol *symbol = assign->getLeft()->getAsSymbolNode();
TIntermConstantUnion *constant = assign->getRight()->getAsConstantUnion(); TIntermConstantUnion *constant = assign->getRight()->getAsConstantUnion();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment