aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeff Walsh2020-10-15 09:55:29 +0200
committerLars Ingebrigtsen2020-10-15 09:55:29 +0200
commit2970d73a71d3c1dff016e98263c0becd12bf1781 (patch)
treec95717e46d9c859929d09330e7074711f27fdc56 /src
parent730ea4c370826277501ff3e364a5e5e92387bd5d (diff)
downloademacs-2970d73a71d3c1dff016e98263c0becd12bf1781.tar.gz
emacs-2970d73a71d3c1dff016e98263c0becd12bf1781.zip
Fix segfault in xwidget when there is no title
* src/xwidget.c (Fxwidget_webkit_title): Pass emptry string when no title is returned (bug#43989).
Diffstat (limited to 'src')
-rw-r--r--src/xwidget.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xwidget.c b/src/xwidget.c
index 154b3e9c82c..e63191ebda9 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -793,7 +793,9 @@ DEFUN ("xwidget-webkit-title",
793 WEBKIT_FN_INIT (); 793 WEBKIT_FN_INIT ();
794#ifdef USE_GTK 794#ifdef USE_GTK
795 WebKitWebView *wkwv = WEBKIT_WEB_VIEW (xw->widget_osr); 795 WebKitWebView *wkwv = WEBKIT_WEB_VIEW (xw->widget_osr);
796 return build_string (webkit_web_view_get_title (wkwv)); 796 const gchar *title = webkit_web_view_get_title (wkwv);
797
798 return build_string (title ? title : "");
797#elif defined NS_IMPL_COCOA 799#elif defined NS_IMPL_COCOA
798 return nsxwidget_webkit_title (xw); 800 return nsxwidget_webkit_title (xw);
799#endif 801#endif