From 5beca9d71fb1b6bb9451b54c7655a2b36891f19b Mon Sep 17 00:00:00 2001 From: Chris Young Date: Mon, 18 Feb 2013 18:39:31 +0000 Subject: Remove spurious error message after closing About --- amiga/menu.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/amiga/menu.c b/amiga/menu.c index 2c6f2fd7d..cdff56f74 100644 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -791,7 +791,7 @@ static void ami_menu_item_project_about(struct Hook *hook, APTR window, struct I struct gui_window_2 *gwin; char *temp, *temp2; int sel; - nsurl *url; + nsurl *url = NULL; nserror error; GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin); @@ -831,17 +831,19 @@ static void ami_menu_item_project_about(struct Hook *hook, APTR window, struct I error = nsurl_create("about:licence", &url); } - if (error == NSERROR_OK) { - error = browser_window_create(BROWSER_WINDOW_VERIFIABLE | - BROWSER_WINDOW_HISTORY, - url, - NULL, - NULL, - NULL); - nsurl_unref(url); - } - if (error != NSERROR_OK) { - warn_user(messages_get_errorcode(error), 0); + if(url) { + if (error == NSERROR_OK) { + error = browser_window_create(BROWSER_WINDOW_VERIFIABLE | + BROWSER_WINDOW_HISTORY, + url, + NULL, + NULL, + NULL); + nsurl_unref(url); + } + if (error != NSERROR_OK) { + warn_user(messages_get_errorcode(error), 0); + } } ami_reset_pointer(gwin); -- cgit v1.2.3