From 9b9c26b569699dd3cfae2babb9053c10519212bb Mon Sep 17 00:00:00 2001 From: Chris Young Date: Tue, 30 Mar 2010 18:14:40 +0000 Subject: [PATCH] Avoid crash if pargc is NULL. This might happen, for example, when launching NetSurf from Workbench under AmigaOS :) svn path=/trunk/netsurf/; revision=10214 --- desktop/netsurf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/netsurf.c b/desktop/netsurf.c index 248f6fef0..ce6814cbe 100644 --- a/desktop/netsurf.c +++ b/desktop/netsurf.c @@ -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)) {