summaryrefslogtreecommitdiff
path: root/riscos/menus.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2005-03-14 22:41:16 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2005-03-14 22:41:16 +0000
commit9caff495770cad2fd5c841fdce4395f7e1ab53ca (patch)
tree540b1f31220c13016b6931a93db7d5b14e7179a7 /riscos/menus.c
parentf6e169489476aa53574739fa0532d0e4c06bbd75 (diff)
downloadnetsurf-9caff495770cad2fd5c841fdce4395f7e1ab53ca.tar.gz
netsurf-9caff495770cad2fd5c841fdce4395f7e1ab53ca.tar.bz2
[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
Diffstat (limited to 'riscos/menus.c')
-rw-r--r--riscos/menus.c6
1 files changed, 6 insertions, 0 deletions
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;