[gnome-disk-utility] Fix reference count issue with the singleton GduMachine



commit 696748f5bc16c3d5dafbe2660bda2cbe4353e7dd
Author: David Zeuthen <davidz redhat com>
Date:   Mon Dec 14 13:58:48 2009 -0500

    Fix reference count issue with the singleton GduMachine
    
    Otherwise, ugh, we segfault on any subsequent recomputation of
    presentables.
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 src/gdu/gdu-pool.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/gdu/gdu-pool.c b/src/gdu/gdu-pool.c
index 059c036..a6056db 100644
--- a/src/gdu/gdu-pool.c
+++ b/src/gdu/gdu-pool.c
@@ -867,7 +867,7 @@ recompute_presentables (GduPool *pool)
         new_presentables = NULL;
         new_partitioned_drives = NULL;
 
-        new_presentables = g_list_prepend (new_presentables, pool->priv->machine);
+        new_presentables = g_list_prepend (new_presentables, g_object_ref (pool->priv->machine));
 
         hash_map_from_drive_to_extended_partition = g_hash_table_new_full ((GHashFunc) gdu_presentable_hash,
                                                                            (GEqualFunc) gdu_presentable_equals,



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