In addUnaryMath, check for 'child' being null before dereferencing it.

This commit is contained in:
Aaron Hamilton 2015-12-06 01:10:54 +00:00
parent 8481679f4d
commit af5a123652

View File

@ -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) {