summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2011-05-14 15:09:19 +0000
committerVincent Sanders <vince@netsurf-browser.org>2011-05-14 15:09:19 +0000
commita7a2759ec9b0d5794419c04ddc0aa529115cd625 (patch)
tree455e2fa0e6e6974482b11e4b48ba9add3c4b61bc /cocoa
parent069a501c4d8ecb53ba2bacb2d53dca37aafdb693 (diff)
downloadnetsurf-a7a2759ec9b0d5794419c04ddc0aa529115cd625.tar.gz
netsurf-a7a2759ec9b0d5794419c04ddc0aa529115cd625.tar.bz2
Fix Segfault at start if ca resource bundle path cannot be found
svn path=/trunk/netsurf/; revision=12410
Diffstat (limited to 'cocoa')
-rw-r--r--cocoa/NetsurfApp.m7
1 files 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);