From ba576ad5d6c7aa808dee631643a8ac878d3205cc Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 25 Jul 2013 11:45:07 +0100 Subject: Guard for uninitalised history case. --- desktop/global_history.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desktop/global_history.c b/desktop/global_history.c index bfafe695e..b9a575468 100644 --- a/desktop/global_history.c +++ b/desktop/global_history.c @@ -809,6 +809,10 @@ nserror global_history_add(nsurl *url) { const struct url_data *data; + /* If we don't have a global history at the moment, just return OK */ + if (gh_ctx.tree == NULL) + return NSERROR_OK; + data = urldb_get_url_data(url); if (data == NULL) { LOG(("Can't add URL to history that's not present in urldb.")); -- cgit v1.2.3