[telepathy-glib/master] contactlist example: Fixed crash when list was being destroyed twice.
Andre Moreira Magalhaes (andrunko)
andrunko at andrunko.cbg.collabora.co.uk
Wed Sep 23 06:58:41 PDT 2009
---
examples/cm/contactlist/contact-list-manager.c | 6 +++++-
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 082fc30..05a1982 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);
}
}
--
1.5.6.5
More information about the telepathy-commits
mailing list