[empathy] Make sure to not ref a NULL object
- From: Xavier Claessens <xclaesse src gnome org>
- To: svn-commits-list gnome org
- Subject: [empathy] Make sure to not ref a NULL object
- Date: Wed, 22 Apr 2009 06:26:10 -0400 (EDT)
commit b19d8cde60b98f0f86a49a8eed0885222e808f2f
Author: Xavier Claessens <xclaesse gmail com>
Date: Tue Feb 17 16:11:48 2009 +0100
Make sure to not ref a NULL object
---
libempathy/empathy-contact.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index 09da70f..d248b2d 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -274,6 +274,9 @@ set_tp_contact (EmpathyContact *contact,
{
EmpathyContactPriv *priv = GET_PRIV (contact);
+ if (tp_contact == NULL)
+ return;
+
g_assert (priv->tp_contact == NULL);
priv->tp_contact = g_object_ref (tp_contact);
priv->presence = empathy_contact_get_presence (contact);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]