Fix a crash in yyerror()

refs #8133
This commit is contained in:
Gunnar Beutner 2015-02-10 15:53:20 +01:00
parent 43595515eb
commit c95d2f14a3
1 changed files with 1 additions and 1 deletions

View File

@ -238,7 +238,7 @@ extern int yydebug;
void yyerror(const YYLTYPE *locp, std::vector<std::pair<Expression *, EItemInfo> > *, ConfigCompiler *context, const char *err) void yyerror(const YYLTYPE *locp, std::vector<std::pair<Expression *, EItemInfo> > *, ConfigCompiler *context, const char *err)
{ {
bool incomplete = context->m_Eof && (context->m_OpenBraces > 0); bool incomplete = context && context->m_Eof && (context->m_OpenBraces > 0);
BOOST_THROW_EXCEPTION(ScriptError(err, *locp, incomplete)); BOOST_THROW_EXCEPTION(ScriptError(err, *locp, incomplete));
} }