From 77159f9e9a2a960b31b0bab37f03ea931ccc05b9 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 9 Mar 2006 14:01:38 +0000 Subject: [project @ 2006-03-09 14:01:38 by jmb] Avoid potential NULL read svn path=/import/netsurf/; revision=2112 --- desktop/browser.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/desktop/browser.c b/desktop/browser.c index 85f90a74b..f71ded55b 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -324,7 +324,10 @@ void browser_window_callback(content_msg msg, struct content *c, history_add(bw->history, c, bw->frag_id); url_content = url_store_find(c->url); if (url_content) { - title = strdup(c->title); + if (c->title) + title = strdup(c->title); + else + title = strdup(c->url); if (title) { free(url_content->title); url_content->title = title; -- cgit v1.2.3