Writing for(;;) in a shader was crashing because
a NULL condition was dereferenced. Added the
NULL pointer check to fix the crash.
Change-Id: I2be7a4594029c928ff83221f65503636bc28f4a9
Reviewed-on: https://swiftshader-review.googlesource.com/3553
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
}\r
else\r
{\r
- condition->traverse(this);\r
+ if(condition)\r
+ {\r
+ condition->traverse(this);\r
+ }\r
\r
emit(sw::Shader::OPCODE_WHILE, 0, condition);\r
\r
expression->traverse(this);\r
}\r
\r
- condition->traverse(this);\r
+ if(condition)\r
+ {\r
+ condition->traverse(this);\r
+ }\r
\r
emit(sw::Shader::OPCODE_ENDWHILE);\r
}\r