summaryrefslogtreecommitdiff
path: root/surf.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq.ml@gmail.com>2014-02-08 12:39:37 +0100
committerChristoph Lohmann <20h@r-36.net>2014-02-08 14:03:22 +0100
commit618c3dfd5238fb2352ebf144eb74173fdd761453 (patch)
treeb1f420b03efb25853ab0048c95d65077af5a8fca /surf.c
parent3cc5f87db85f84e37666936d42d5345daef94ad3 (diff)
downloadsurf-618c3dfd5238fb2352ebf144eb74173fdd761453.tar.gz
surf-618c3dfd5238fb2352ebf144eb74173fdd761453.tar.bz2
surf-618c3dfd5238fb2352ebf144eb74173fdd761453.zip
Prevent title from being empty when following an anchor
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat (limited to 'surf.c')
-rw-r--r--surf.c6
1 files 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