From aeb9119fb715aa54ef1f4ab8ed4cac1381cdbf59 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 21 May 2014 10:47:23 +0200 Subject: [PATCH 1/9] contact-list: don't crash if 'd' is NULL https://bugs.freedesktop.org/show_bug.cgi?id=79006 --- examples/cm/contactlist/contact-list.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cm/contactlist/contact-list.c b/examples/cm/contactlist/contact-list.c index 3a5ca85..932a181 100644 --- a/examples/cm/contactlist/contact-list.c +++ b/examples/cm/contactlist/contact-list.c @@ -838,8 +838,12 @@ receive_auth_request (ExampleContactList *self, g_message ("From server: %s has cancelled their publish request", tp_handle_inspect (self->priv->contact_repo, contact)); - d->publish = FALSE; - d->pre_approved = FALSE; + if (d) + { + d->publish = FALSE; + d->pre_approved = FALSE; + } + g_hash_table_remove (self->priv->publish_requests, GUINT_TO_POINTER (contact)); tp_handle_set_add (self->priv->cancelled_publish_requests, contact); -- 1.9.0