Fix Segfault at start if ca resource bundle path cannot be found

svn path=/trunk/netsurf/; revision=12410
This commit is contained in:
Vincent Sanders 2011-05-14 15:09:19 +00:00
parent 069a501c4d
commit a7a2759ec9
1 changed files with 5 additions and 2 deletions

View File

@ -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);