From 463b2eca986be38b47f66f3cc53c9e65178955bb Mon Sep 17 00:00:00 2001 From: Quentin Rameau Date: Sat, 8 Feb 2014 12:39:37 +0100 Subject: [PATCH] Prevent title from being empty when following an anchor --- surf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/surf.c b/surf.c index 28d8465..1534f5c 100644 --- a/surf.c +++ b/surf.c @@ -1179,8 +1179,10 @@ stop(Client *c, const Arg *arg) { static void titlechange(WebKitWebView *view, GParamSpec *pspec, Client *c) { const gchar *t = webkit_web_view_get_title(view); - c->title = copystr(&c->title, t); - updatetitle(c); + if (t) { + c->title = copystr(&c->title, t); + updatetitle(c); + } } static void -- 1.8.5.4