Fix crash when encountering invalid identifier

This commit is contained in:
Phillip Stephens 2016-02-18 08:33:34 -08:00
parent b430c28529
commit 1d18d8080f
1 changed files with 1 additions and 1 deletions

View File

@ -407,7 +407,7 @@ void Lexer::EmitVec4(IR& ir, const Lexer::OperationNode* funcNode, IR::RegID tar
const Parser::Token* imms[4];
for (int i=0 ; i<4 ; ++i)
{
if (!gn->m_sub || gn->m_sub->m_tok.m_type != Parser::TokenType::NumLiteral)
if (!gn || !gn->m_sub || gn->m_sub->m_tok.m_type != Parser::TokenType::NumLiteral)
{
opt = false;
break;