diff --git a/riscos/menus.c b/riscos/menus.c index 01191b03f..f8ab3f34e 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -509,6 +509,9 @@ void ro_gui_menu_closed(void) { struct tree *tree; os_error *error; + if (!current_menu) + return; + error = xwimp_create_menu(wimp_CLOSE_MENU, 0, 0); if (error) { LOG(("xwimp_create_menu: 0x%x: %s", @@ -516,9 +519,6 @@ void ro_gui_menu_closed(void) { warn_user("MenuError", error->errmess); } - if (!current_menu) - return; - ro_gui_menu_get_window_details(current_menu_window, &g, &bw, &c, &t, &tree); current_menu = NULL;