seahorse r2674 - in trunk: . libseahorse



Author: nnielsen
Date: Tue Dec 16 17:52:51 2008
New Revision: 2674
URL: http://svn.gnome.org/viewvc/seahorse?rev=2674&view=rev

Log:
	* libseahorse/seahorse-set-model.c: Remove objects that 
	disappeared from table properly. Fixes assertion on exit.


Modified:
   trunk/ChangeLog
   trunk/libseahorse/seahorse-set-model.c

Modified: trunk/libseahorse/seahorse-set-model.c
==============================================================================
--- trunk/libseahorse/seahorse-set-model.c	(original)
+++ trunk/libseahorse/seahorse-set-model.c	Tue Dec 16 17:52:51 2008
@@ -268,6 +268,9 @@
 	g_node_traverse (node, G_POST_ORDER, G_TRAVERSE_ALL, -1, 
 	                 (GNodeTraverseFunc)remove_each_object, smodel);
 
+	/* This is needed for objects that went away */
+	g_hash_table_remove (pv->object_to_node, was_sobj);
+
 	/* 
 	 * Now check if the parent of this object is actually in the set, or was 
 	 * just added for the sake of holding the child (see add_object above)
@@ -652,6 +655,7 @@
 	if (pv->root_node) {
 		g_node_traverse (pv->root_node, G_POST_ORDER, G_TRAVERSE_ALL, -1, 
 				 (GNodeTraverseFunc)remove_each_object, smodel);
+		g_assert (g_hash_table_size (pv->object_to_node) == 0);
 	}
 
 	/* Disconnect from the set */



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