Commit 27657498 by John Kessenich

Merge pull request #109 from xorgy/add-unary-math-check-for-null-before-dereferencing

In addUnaryMath, check for 'child' being null before dereferencing it.
parents 8481679f af5a1236
......@@ -189,10 +189,10 @@ TIntermTyped* TIntermediate::addIndex(TOperator op, TIntermTyped* base, TIntermT
//
TIntermTyped* TIntermediate::addUnaryMath(TOperator op, TIntermTyped* child, TSourceLoc loc)
{
if (child->getType().getBasicType() == EbtBlock)
if (child == 0)
return 0;
if (child == 0)
if (child->getType().getBasicType() == EbtBlock)
return 0;
switch (op) {
......
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