tPrevent title from being empty when following an anchor - surf - customized build of surf, the suckless webkit browser
(HTM) git clone git://src.adamsgaard.dk/surf
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 618c3dfd5238fb2352ebf144eb74173fdd761453
(DIR) parent 3cc5f87db85f84e37666936d42d5345daef94ad3
(HTM) Author: Quentin Rameau <quinq.ml@gmail.com>
Date: Sat, 8 Feb 2014 12:39:37 +0100
Prevent title from being empty when following an anchor
Signed-off-by: Christoph Lohmann <20h@r-36.net>
Diffstat:
M surf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
(DIR) diff --git a/surf.c b/surf.c
t@@ -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