From d09ac4433a385644b5e5e94bc06eb69ea84877f4 Mon Sep 17 00:00:00 2001 From: Ole Loots Date: Sat, 28 Dec 2013 13:24:34 +0100 Subject: Fallback to about:welcome on home click when no homepage option is set. --- atari/toolbar.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/atari/toolbar.c b/atari/toolbar.c index 115ac4fad..1946b05c5 100644 --- a/atari/toolbar.c +++ b/atari/toolbar.c @@ -982,6 +982,7 @@ void toolbar_home_click(struct s_toolbar *tb) struct browser_window * bw; struct gui_window * gw; nsurl *url; + char * use_url = NULL; gw = window_get_active_gui_window(tb->owner); assert(gw != NULL); @@ -989,10 +990,13 @@ void toolbar_home_click(struct s_toolbar *tb) assert(bw != NULL); if(nsoption_charp(homepage_url) == NULL){ - return; + use_url = "about:welcome"; + } + else { + use_url = nsoption_charp(homepage_url); } - if (nsurl_create(nsoption_charp(homepage_url), &url) != NSERROR_OK) { + if (nsurl_create(use_url, &url) != NSERROR_OK) { warn_user("NoMemory", 0); } else { browser_window_navigate(bw, -- cgit v1.2.3