diff options
author | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-03 00:26:45 +0000 |
---|---|---|
committer | Chris Young <chris@unsatisfactorysoftware.co.uk> | 2014-01-03 00:26:45 +0000 |
commit | 8d82cd9963942cd9e78081c27639f69557ca4f08 (patch) | |
tree | 013d11101a0e368d837c5257607678a70d1915ab | |
parent | 9bd355e30c1f6aa57d42fe4f2fa6e9f521f002a4 (diff) | |
download | netsurf-8d82cd9963942cd9e78081c27639f69557ca4f08.tar.gz netsurf-8d82cd9963942cd9e78081c27639f69557ca4f08.tar.bz2 |
Attempt fix/workaround of bug #2034
-rw-r--r-- | amiga/menu.c | 8 |
1 files changed, 7 insertions, 1 deletions
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) |