[libdazzle] suggestions: be defensive with window group cleanup



commit a49425fd3947f0c645a7c63dc84f09a633188cb8
Author: Christian Hergert <chergert redhat com>
Date:   Sun Dec 17 03:31:40 2017 -0800

    suggestions: be defensive with window group cleanup

 src/suggestions/dzl-suggestion-popover.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/suggestions/dzl-suggestion-popover.c b/src/suggestions/dzl-suggestion-popover.c
index 3020e9d..a9e1ea0 100644
--- a/src/suggestions/dzl-suggestion-popover.c
+++ b/src/suggestions/dzl-suggestion-popover.c
@@ -221,8 +221,12 @@ dzl_suggestion_popover_hide (GtkWidget *widget)
   g_return_if_fail (DZL_IS_SUGGESTION_POPOVER (self));
 
   if (self->transient_for != NULL)
-    gtk_window_group_remove_window (gtk_window_get_group (self->transient_for),
-                                    GTK_WINDOW (self));
+    {
+      GtkWindowGroup *group = gtk_window_get_group (self->transient_for);
+
+      if (group != NULL)
+        gtk_window_group_remove_window (group, GTK_WINDOW (self));
+    }
 
   g_signal_handler_disconnect (self->transient_for, self->delete_event_handler);
   g_signal_handler_disconnect (self->transient_for, self->size_allocate_handler);


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