mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-04-10 20:14:32 +00:00
quick and dirty fix to lexerror for when fopen fails
This commit is contained in:
parent
7b74a2bb94
commit
33be9edec7
1 changed files with 4 additions and 1 deletions
5
lexer.c
5
lexer.c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue