diff options
author | Richard Wilson <rjw@netsurf-browser.org> | 2005-05-14 16:13:36 +0000 |
---|---|---|
committer | Richard Wilson <rjw@netsurf-browser.org> | 2005-05-14 16:13:36 +0000 |
commit | cfa4abed971120dbf1e09dc99cda060ca261d37c (patch) | |
tree | 519c5378cfa82fcd6e26df5519b470b9fd8b62b1 | |
parent | 659b42ca56e32cc7241452a29d547a8171832a32 (diff) | |
download | netsurf-cfa4abed971120dbf1e09dc99cda060ca261d37c.tar.gz netsurf-cfa4abed971120dbf1e09dc99cda060ca261d37c.tar.bz2 |
[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
-rw-r--r-- | riscos/menus.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 */ |