diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-02-18 18:39:31 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2013-02-18 18:39:31 +0000 |
commit | 5beca9d71fb1b6bb9451b54c7655a2b36891f19b (patch) | |
tree | da1a3de4f0b5869e0eb30f285477dbb3da225c6e /amiga | |
parent | a86ff2ac2c9b3416e755407058fa7d1029aff5b5 (diff) | |
download | netsurf-5beca9d71fb1b6bb9451b54c7655a2b36891f19b.tar.gz netsurf-5beca9d71fb1b6bb9451b54c7655a2b36891f19b.tar.bz2 |
Remove spurious error message after closing About
Diffstat (limited to 'amiga')
-rw-r--r-- | amiga/menu.c | 26 |
1 files 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); |