From efbfbbc96732ba7b0b8f526b07c776908c79533b Mon Sep 17 00:00:00 2001 From: Chris Young Date: Wed, 31 Oct 2012 20:50:22 +0000 Subject: Fix a serious crash that occurs if the underlying window is closed during a hook function invoked from it. --- amiga/gui.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'amiga/gui.c') diff --git a/amiga/gui.c b/amiga/gui.c index 15ac1f553..37f054776 100755 --- a/amiga/gui.c +++ b/amiga/gui.c @@ -1927,6 +1927,16 @@ void ami_handle_msg(void) ami_update_throbber(gwin, true); refresh_throbber = FALSE; } + + if(ami_menu_window_close) + { + if(ami_menu_window_close == AMI_MENU_WINDOW_CLOSE_ALL) + ami_quit_netsurf(); + else + ami_close_all_tabs(ami_menu_window_close); + + ami_menu_window_close = NULL; + } } void ami_gui_appicon_remove(struct gui_window_2 *gwin) @@ -2276,6 +2286,8 @@ void ami_quit_netsurf(void) } } while(node = nnode); + + win_destroyed = true; } if(IsMinListEmpty(window_list)) -- cgit v1.2.3