From 9caff495770cad2fd5c841fdce4395f7e1ab53ca Mon Sep 17 00:00:00 2001 From: Richard Wilson Date: Mon, 14 Mar 2005 22:41:16 +0000 Subject: [project @ 2005-03-14 22:41:16 by rjw] Stop a lack of hotlist causing hotlist menu preparation from crashing. svn path=/import/netsurf/; revision=1537 --- riscos/menus.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'riscos') diff --git a/riscos/menus.c b/riscos/menus.c index 8b6163f39..9c7fd4347 100644 --- a/riscos/menus.c +++ b/riscos/menus.c @@ -2008,6 +2008,9 @@ void ro_gui_menu_prepare_hotlist(void) { bool selection = false; struct node *single = NULL; + if (!hotlist_tree) + return; + if (hotlist_tree->root->child) { single = tree_get_selected_node(hotlist_tree->root->child); selection = tree_has_selection(hotlist_tree->root->child); @@ -2068,6 +2071,9 @@ void ro_gui_menu_prepare_global_history(void) { bool reopen = false; bool selection = false; + if (!global_history_tree) + return; + if (global_history_tree->root->child) { selection = tree_has_selection(global_history_tree->root->child); global_history_menu->entries[2].icon_flags &= ~wimp_ICON_SHADED; -- cgit v1.2.3