Avoid crash if pargc is NULL. This might happen, for example, when launching NetSurf

from Workbench under AmigaOS :)

svn path=/trunk/netsurf/; revision=10214
This commit is contained in:
Chris Young 2010-03-30 18:14:40 +00:00
parent 07537e5240
commit 9b9c26b569

View File

@ -80,7 +80,8 @@ nserror netsurf_init(int *pargc,
stdout = stderr;
#endif
if (((*pargc) > 1) &&
if ((pargc) &&
((*pargc) > 1) &&
((*pargv)[1][0] == '-') &&
((*pargv)[1][1] == 'v') &&
((*pargv)[1][2] == 0)) {