From 8d82cd9963942cd9e78081c27639f69557ca4f08 Mon Sep 17 00:00:00 2001 From: Chris Young Date: Fri, 3 Jan 2014 00:26:45 +0000 Subject: Attempt fix/workaround of bug #2034 --- amiga/menu.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'amiga') diff --git a/amiga/menu.c b/amiga/menu.c index a9185e823..59d244112 100644 --- a/amiga/menu.c +++ b/amiga/menu.c @@ -61,6 +61,7 @@ #include "desktop/hotlist.h" #include "desktop/browser_private.h" #include "desktop/gui.h" +#include "desktop/local_history.h" #include "desktop/textinput.h" #include "utils/messages.h" #include "utils/schedule.h" @@ -715,6 +716,7 @@ static void ami_menu_item_project_newtab(struct Hook *hook, APTR window, struct struct gui_window_2 *gwin; nsurl *url; nserror error; + struct browser_window *bw = NULL; GetAttr(WINDOW_UserData, (Object *)window, (ULONG *)&gwin); @@ -726,12 +728,16 @@ static void ami_menu_item_project_newtab(struct Hook *hook, APTR window, struct url, NULL, gwin->bw, - NULL); + &bw); nsurl_unref(url); } if (error != NSERROR_OK) { warn_user(messages_get_errorcode(error), 0); + return; } + + history_destroy(bw->history); + bw->history = history_create(); } static void ami_menu_item_project_open(struct Hook *hook, APTR window, struct IntuiMessage *msg) -- cgit v1.2.3