[Libreoffice-commits] core.git: vcl/inc
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Thu May 13 12:55:05 UTC 2021
vcl/inc/unx/gtk/gtkdata.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 4f757de6fe5e070cadf5516ef349af8080235a40
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu May 13 10:28:14 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Thu May 13 14:54:19 2021 +0200
gtk4: skip gtk_widget_get_root if pWidget is null
Change-Id: I3ac47e67b1b16728a448ff8341f31c107d38556f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115548
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/inc/unx/gtk/gtkdata.hxx b/vcl/inc/unx/gtk/gtkdata.hxx
index 7dbc350353e4..84fe264375d0 100644
--- a/vcl/inc/unx/gtk/gtkdata.hxx
+++ b/vcl/inc/unx/gtk/gtkdata.hxx
@@ -71,7 +71,7 @@ inline void css_provider_load_from_data(GtkCssProvider *css_provider,
inline GtkWidget* widget_get_root(GtkWidget* pWidget)
{
#if GTK_CHECK_VERSION(4, 0, 0)
- return GTK_WIDGET(gtk_widget_get_root(pWidget));
+ return pWidget ? GTK_WIDGET(gtk_widget_get_root(pWidget)) : nullptr;
#else
return gtk_widget_get_toplevel(pWidget);
#endif
More information about the Libreoffice-commits
mailing list