[gtk/wip/muktupavels/fix-critical-warning] menu: fix critical warning



commit fc6b387d69e5ee2948445799427d6bc6a992c4f9
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Nov 14 17:49:20 2019 +0200

    menu: fix critical warning
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/1899

 gtk/gtkmenu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index 1be93d2b5e..c23cac9fe7 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -3353,7 +3353,9 @@ menu_grab_transfer_window_destroy (GtkMenu *menu)
       g_object_set_data (G_OBJECT (menu), I_("gtk-menu-transfer-window"), NULL);
 
       widget_window = gtk_widget_get_window (GTK_WIDGET (menu));
-      g_object_set_data (G_OBJECT (widget_window), I_("gdk-attached-grab-window"), window);
+
+      if (widget_window != NULL)
+        g_object_set_data (G_OBJECT (widget_window), I_("gdk-attached-grab-window"), window);
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]