X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=surf.c;h=1534f5ccd3d3dca3cabfa43221c0dc25d89cf172;hb=618c3dfd5238fb2352ebf144eb74173fdd761453;hp=28d84657a27ffb6d66bc521134d8869a11dc44ab;hpb=3cc5f87db85f84e37666936d42d5345daef94ad3;p=surf.git 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