summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-06-02 16:29:30 +0200
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2014-06-03 10:46:59 +0200
commit5c0256475ee32eb8207bacbaac5ce58ae7dc7483 (patch)
tree55fdf45fb6e48ecc596329a0aeec7db8828b0e23
parentd7e92269ae55f477aef7acb59841be27bdc22de3 (diff)
downloadtelepathy-gabble-5c0256475ee32eb8207bacbaac5ce58ae7dc7483.tar.gz
conn-contact-info: prevent a potential NULL dereferencing
-rw-r--r--src/conn-contact-info.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/conn-contact-info.c b/src/conn-contact-info.c
index 599197b9b..fd5c4a7eb 100644
--- a/src/conn-contact-info.c
+++ b/src/conn-contact-info.c
@@ -483,8 +483,10 @@ _return_from_request_contact_info (WockyNode *vcard_node,
if (NULL == vcard_node)
{
- GError tp_error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE,
- vcard_error->message };
+ GError tp_error = { TP_ERROR, TP_ERROR_NOT_AVAILABLE, "" };
+
+ g_assert (vcard_error != NULL);
+ tp_error.message = vcard_error->message;
if (vcard_error->domain == WOCKY_XMPP_ERROR)
{