quick and dirty fix to lexerror for when fopen fails

This commit is contained in:
Wolfgang (Blub) Bumiller 2012-11-17 10:36:35 +01:00
parent 7b74a2bb94
commit 33be9edec7

View file

@ -13,7 +13,10 @@ void lexerror(lex_file *lex, const char *fmt, ...)
va_list ap;
va_start(ap, fmt);
con_vprintmsg(LVL_ERROR, lex->name, lex->sline, "parse error", fmt, ap);
if (lex)
con_vprintmsg(LVL_ERROR, lex->name, lex->sline, "parse error", fmt, ap);
else
con_vprintmsg(LVL_ERROR, "", 0, "parse error", fmt, ap);
va_end(ap);
}