From a7a2759ec9b0d5794419c04ddc0aa529115cd625 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Sat, 14 May 2011 15:09:19 +0000 Subject: Fix Segfault at start if ca resource bundle path cannot be found svn path=/trunk/netsurf/; revision=12410 --- cocoa/NetsurfApp.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 8caa9f849..be448c925 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -176,8 +176,11 @@ int main( int argc, char **argv ) const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String]; const char * const options = cocoa_get_options_file(); - - option_ca_bundle = strdup( [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String] ); + const char * const ca_bundle = [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String]; + + if (ca_bundle != NULL) { + option_ca_bundle = strdup(ca_bundle); + } netsurf_init(&argc, &argv, options, messages); -- cgit v1.2.3