diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-17 14:20:18 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-17 14:20:18 +0100 |
commit | 35eb251244ee360cedef6ec1143e65b59da604a8 (patch) | |
tree | b1f508161b6d7502abd534d786650ca7507373a5 /cocoa/NetsurfApp.m | |
parent | 26ac642ef9f6bb439f10a7fc3188823ba1f7bffd (diff) | |
download | netsurf-35eb251244ee360cedef6ec1143e65b59da604a8.tar.gz netsurf-35eb251244ee360cedef6ec1143e65b59da604a8.tar.bz2 |
Fix "error setting certificate verify locations" problem when the Choices file doesn't exist. Now there's a single place for front ends to set options overrides. Fix nsoption_setnull_charp leak.
Diffstat (limited to 'cocoa/NetsurfApp.m')
-rw-r--r-- | cocoa/NetsurfApp.m | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cocoa/NetsurfApp.m b/cocoa/NetsurfApp.m index 65c9f8cd1..4c2dfc185 100644 --- a/cocoa/NetsurfApp.m +++ b/cocoa/NetsurfApp.m @@ -164,15 +164,21 @@ void cocoa_autorelease( void ) pool = [[NSAutoreleasePool alloc] init]; } +/* Documented in desktop/options.h */ +void gui_options_init_defaults(void) +{ + /* Set defaults for absent option strings */ + const char * const ca_bundle = [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String]; + + nsoption_setnull_charp(ca_bundle, strdup(ca_bundle)); +} + int main( int argc, char **argv ) { cocoa_autorelease(); const char * const messages = [[[NSBundle mainBundle] pathForResource: @"Messages" ofType: @""] UTF8String]; const char * const options = cocoa_get_options_file(); - const char * const ca_bundle = [[[NSBundle mainBundle] pathForResource: @"ca-bundle" ofType: @""] UTF8String]; - - nsoption_setnull_charp(ca_bundle, strdup(ca_bundle)); netsurf_init(&argc, &argv, options, messages); |