[gnome-control-center] power: Prevent UpDevice being kept alive



commit 71b5643d91204e5fd4ef23cf586d118aaeea1498
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Oct 18 00:14:54 2013 +0200

    power: Prevent UpDevice being kept alive
    
    If a UpDevice was removed while the panel was opened, it was
    removed from the list of devices, and never unref'ed, still receiving
    signals.

 panels/power/cc-power-panel.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/panels/power/cc-power-panel.c b/panels/power/cc-power-panel.c
index 75e8ce2..56bbf66 100644
--- a/panels/power/cc-power-panel.c
+++ b/panels/power/cc-power-panel.c
@@ -825,6 +825,7 @@ up_client_device_removed (UpClient     *client,
 
       if (g_strcmp0 (object_path, up_device_get_object_path (device)) == 0)
         {
+          g_object_unref (device);
           g_ptr_array_remove_index (priv->devices, i);
           break;
         }


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