summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andrunko@andrunko.cbg.collabora.co.uk>2009-09-23 10:58:41 -0300
committerAndre Moreira Magalhaes (andrunko) <andrunko@andrunko.cbg.collabora.co.uk>2009-09-23 10:58:41 -0300
commitb1a3aeb9168a1e15375e46c5904cb5a948011a0d (patch)
treedf2504b72c2aa44f80c63d5481f891cf13e189cd
parent5d7f4eee0ad01fc0fd20059e892a6b87ab6a8424 (diff)
downloadtelepathy-glib-b1a3aeb9168a1e15375e46c5904cb5a948011a0d.tar.gz
contactlist example: Fixed crash when list was being destroyed twice.
-rw-r--r--examples/cm/contactlist/contact-list-manager.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/cm/contactlist/contact-list-manager.c b/examples/cm/contactlist/contact-list-manager.c
index 082fc30c2..05a1982f0 100644
--- a/examples/cm/contactlist/contact-list-manager.c
+++ b/examples/cm/contactlist/contact-list-manager.c
@@ -211,8 +211,12 @@ example_contact_list_manager_close_all (ExampleContactListManager *self)
{
if (self->priv->lists[i] != NULL)
{
- g_object_unref (self->priv->lists[i]);
+ ExampleContactList *list = self->priv->lists[i];
+
+ /* set self->priv->lists[i] to NULL here so list_closed_cb does
+ * not try to delete the list again */
self->priv->lists[i] = NULL;
+ g_object_unref (list);
}
}