diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-05-21 10:47:23 +0200 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2014-05-26 14:03:44 +0200 |
commit | ff81777b6176f5379a8c1f6152625f498757ddb1 (patch) | |
tree | 0cfd2c2b456d59377129ff6ac765772ffa41cb81 | |
parent | ae627c03b209c521cf6c2f17b9d22fc44a6cd207 (diff) |
contact-list: don't crash if 'd' is NULL
https://bugs.freedesktop.org/show_bug.cgi?id=79006
-rw-r--r-- | examples/cm/contactlist/contact-list.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/cm/contactlist/contact-list.c b/examples/cm/contactlist/contact-list.c index 36fa74f40..a23d18651 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); |