From ce4d52e72aa0fc09bd2207db175bc83c278bb0c6 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Sat, 24 May 2014 15:09:20 +0100 Subject: Fix hotlist and global_history _get_selection functions. Broken when selection was folder, rather than entry. Renamed tree_node_flags lables to avoid TREE_NODE_NONE name clash. --- desktop/global_history.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'desktop/global_history.c') diff --git a/desktop/global_history.c b/desktop/global_history.c index 09154f2d1..ebccfc6b6 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -954,10 +954,11 @@ bool global_history_has_selection(void) bool global_history_get_selection(nsurl **url, const char **title) { struct global_history_entry *e; + enum treeview_node_type type; void *v; - treeview_get_selection(gh_ctx.tree, &v); - if (v == NULL) { + type = treeview_get_selection(gh_ctx.tree, &v); + if (type != TREE_NODE_ENTRY || v == NULL) { *url = NULL; *title = NULL; return false; -- cgit v1.2.3