In case a page without a title or a none html file which can be shown is
opened, webkit informed us about the title change to empty string. But
no window title is no good idea, especial in case vimb runs within
tabbed and there are multiple unnamed tabs.
So we set the webview title only if it's not empty.
*/
static void on_webview_notify_title(WebKitWebView *webview, GParamSpec *pspec, Client *c)
{
- set_title(c, webkit_web_view_get_title(webview));
+ const char *title = webkit_web_view_get_title(webview);
+
+ if (*title) {
+ set_title(c, title);
+ }
}
/**