From d398caf146f35d1bc7386e853ce16e2ef457fbc2 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Tue, 4 Jun 2013 15:31:29 +0100 Subject: Ensure there's a title. --- desktop/global_history.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'desktop/global_history.c') diff --git a/desktop/global_history.c b/desktop/global_history.c index f8bd180b7..a675d8383 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -134,9 +134,11 @@ static nserror global_history_create_treeview_field_data( struct global_history_entry *e, const struct url_data *data) { + const char *title = (data->title != NULL) ? data->title : ""; + e->data[0].field = gh_ctx.fields[0].field; - e->data[0].value = strdup(data->title); - e->data[0].value_len = strlen(data->title); + e->data[0].value = strdup(title); + e->data[0].value_len = strlen(title); e->data[1].field = gh_ctx.fields[1].field; e->data[1].value = nsurl_access(e->url); -- cgit v1.2.3