prevent crash if function is called with NULL argument
This commit is contained in:
parent
f92f3f5f65
commit
82bdb4aa0a
|
|
@ -319,6 +319,8 @@ gettok(char **s)
|
||||||
char *
|
char *
|
||||||
nexttok(const char *s)
|
nexttok(const char *s)
|
||||||
{
|
{
|
||||||
|
if (!s)
|
||||||
|
return NULL;
|
||||||
int paren = 0;
|
int paren = 0;
|
||||||
|
|
||||||
s = skip_ws(s);
|
s = skip_ws(s);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue