diff options
Diffstat (limited to 'widgets/table/e-table-group-container.c')
-rw-r--r-- | widgets/table/e-table-group-container.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index ff5b1087b2..4327c2f94e 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -826,11 +826,16 @@ e_table_group_apply_to_leafs (ETableGroup *etg, ETableGroupLeafFn fn, void *clos ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); GList *list = etgc->children; + /* Protect from unrefs in the callback functions */ + gtk_object_ref (GTK_OBJECT (etg)); + for (list = etgc->children; list; list = list->next){ ETableGroupContainerChildNode *child_node = list->data; e_table_group_apply_to_leafs (child_node->child, fn, closure); } + + gtk_object_unref (GTK_OBJECT (etg)); } else if (E_IS_TABLE_GROUP_LEAF (etg)){ (*fn) (E_TABLE_GROUP_LEAF (etg)->item, closure); } else { |