summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2013-06-04 15:31:29 +0100
committerMichael Drake <tlsa@netsurf-browser.org>2013-06-04 15:31:29 +0100
commitd398caf146f35d1bc7386e853ce16e2ef457fbc2 (patch)
tree209fdc90d019db77f5335b0eb342dbc6bbb946a9
parent9919b77f1995e8379870d610aea7a2e227882297 (diff)
downloadnetsurf-d398caf146f35d1bc7386e853ce16e2ef457fbc2.tar.gz
netsurf-d398caf146f35d1bc7386e853ce16e2ef457fbc2.tar.bz2
Ensure there's a title.
-rw-r--r--desktop/global_history.c6
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);