Fix crash bug when condition expression is empty.
This commit is contained in:
parent
9057a46a20
commit
17d3e36bd6
|
@ -626,7 +626,12 @@ bool COMPILER::generateUCode( UCODE* aCode, CONTEXT* aPreflightContext )
|
||||||
return visitedNodes.find( node ) != visitedNodes.end();
|
return visitedNodes.find( node ) != visitedNodes.end();
|
||||||
};
|
};
|
||||||
|
|
||||||
assert( m_tree );
|
if( !m_tree )
|
||||||
|
{
|
||||||
|
// Empty expression returns true
|
||||||
|
aCode->AddOp( makeUop( TR_UOP_PUSH_VALUE, 1.0 ) );
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
stack.push_back( m_tree );
|
stack.push_back( m_tree );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue