diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2013-06-04 15:31:29 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2013-06-04 15:31:29 +0100 |
commit | d398caf146f35d1bc7386e853ce16e2ef457fbc2 (patch) | |
tree | 209fdc90d019db77f5335b0eb342dbc6bbb946a9 /desktop | |
parent | 9919b77f1995e8379870d610aea7a2e227882297 (diff) | |
download | netsurf-d398caf146f35d1bc7386e853ce16e2ef457fbc2.tar.gz netsurf-d398caf146f35d1bc7386e853ce16e2ef457fbc2.tar.bz2 |
Ensure there's a title.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/global_history.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 : "<No 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); |