[gnome-flashback] notifications: remove update_idle source last



commit 3caaad92311e681d22340747cabf156aac1033b0
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Sun Feb 9 16:20:43 2020 +0200

    notifications: remove update_idle source last
    
    Destroying bubbles in stack will call queue_update.

 gnome-flashback/libnotifications/nd-queue.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnome-flashback/libnotifications/nd-queue.c b/gnome-flashback/libnotifications/nd-queue.c
index c9dcd9e..2d172f0 100644
--- a/gnome-flashback/libnotifications/nd-queue.c
+++ b/gnome-flashback/libnotifications/nd-queue.c
@@ -484,10 +484,6 @@ nd_queue_finalize (GObject *object)
 
         g_return_if_fail (queue->priv != NULL);
 
-        if (queue->priv->update_id != 0) {
-                g_source_remove (queue->priv->update_id);
-        }
-
         g_hash_table_destroy (queue->priv->notifications);
         g_hash_table_destroy (queue->priv->bubbles);
         g_queue_free (queue->priv->queue);
@@ -499,6 +495,11 @@ nd_queue_finalize (GObject *object)
 
         g_clear_pointer (&queue->priv->dock, gtk_widget_destroy);
 
+        if (queue->priv->update_id != 0) {
+                g_source_remove (queue->priv->update_id);
+                queue->priv->update_id = 0;
+        }
+
         G_OBJECT_CLASS (nd_queue_parent_class)->finalize (object);
 }
 


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