[anjuta/symbol-db-model] symbol-db: Fixed unbalanced ref counting
- From: Naba Kumar <naba src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/symbol-db-model] symbol-db: Fixed unbalanced ref counting
- Date: Sun, 14 Mar 2010 13:55:31 +0000 (UTC)
commit f499a9ca3cceb5ae25cda1ff893c1e7d2fea3800
Author: Naba Kumar <naba gnome org>
Date: Sun Mar 14 15:59:27 2010 +0200
symbol-db: Fixed unbalanced ref counting
plugins/symbol-db/symbol-db-model.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/symbol-db/symbol-db-model.c b/plugins/symbol-db/symbol-db-model.c
index 21c2b15..493e867 100644
--- a/plugins/symbol-db/symbol-db-model.c
+++ b/plugins/symbol-db/symbol-db-model.c
@@ -255,7 +255,12 @@ static void
symbol_db_model_node_ref_child (SymbolDBModelNode *node)
{
g_return_if_fail (node != NULL);
+
node->children_ref_count++;
+
+ /* Increate associated ref count on parent also */
+ if (node->parent)
+ symbol_db_model_node_ref_child (node->parent);
}
static void
@@ -276,7 +281,7 @@ symbol_db_model_node_unref_child (SymbolDBModelNode *node, gint child_offset)
symbol_db_model_node_cleanse (node);
}
- /* Reduce the associate ref count on parent also */
+ /* Reduce the associated ref count on parent also */
if (parent_node)
symbol_db_model_node_unref_child (parent_node, node_offset);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]