From 35eb251244ee360cedef6ec1143e65b59da604a8 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Wed, 17 Oct 2012 14:20:18 +0100 Subject: 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. --- windows/main.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'windows') diff --git a/windows/main.c b/windows/main.c index 6fbf40174..7d158660a 100644 --- a/windows/main.c +++ b/windows/main.c @@ -79,6 +79,15 @@ bool nslog_ensure(FILE *fptr) return true; } +/* Documented in desktop/options.h */ +void gui_options_init_defaults(void) +{ + /* Set defaults for absent option strings */ + + /* ensure homepage option has a default */ + nsoption_setnull_charp(homepage_url, strdup(NETSURF_HOMEPAGE)); +} + /** * Entry point from operating system **/ @@ -138,9 +147,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd) nsws_window_init_pointers(hInstance); - /* ensure homepage option has a default */ - nsoption_setnull_charp(homepage_url, strdup(NETSURF_HOMEPAGE)); - /* If there is a url specified on the command line use it */ if (argc > 1) { addr = argv[1]; -- cgit v1.2.3