summaryrefslogtreecommitdiff
path: root/cocoa
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2012-10-17 14:20:18 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2012-10-17 14:20:18 +0100
commit35eb251244ee360cedef6ec1143e65b59da604a8 (patch)
treeb1f508161b6d7502abd534d786650ca7507373a5 /cocoa
parent26ac642ef9f6bb439f10a7fc3188823ba1f7bffd (diff)
downloadnetsurf-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')
-rw-r--r--cocoa/NetsurfApp.m12
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);