From cfa4abed971120dbf1e09dc99cda060ca261d37c Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Sat, 14 May 2005 16:13:36 +0000 Subject: [project @ 2005-05-14 16:13:36 by rjw] Recognise that current_gui may me NULL on menu selection if gui_multitask has been called. svn path=/import/netsurf/; revision=1722 --- riscos/menus.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'riscos') diff --git a/riscos/menus.c b/riscos/menus.c index e5f719e16..0fb7cec1f 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -553,7 +553,10 @@ void ro_gui_menu_selection(wimp_selection *selection) { wimp_menu *menu; os_error *error; - assert(current_menu); + /* if we are using gui_multitask then menu selection events may be delivered + * after the menu has been closed. As such, we simply ignore these events. */ + if (!current_menu) + return assert(current_menu_window); /* get the menu entry and associated action */ -- cgit v1.2.3