summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSenko Rasic <senko.rasic@collabora.co.uk>2007-09-19 16:05:36 +0000
committerSenko Rasic <senko.rasic@collabora.co.uk>2007-09-19 16:05:36 +0000
commitbf92c6184951ca5af10c5676c2784c1cba0d17b1 (patch)
tree659f2a50f3e8e495d9b388f4b8a708fb3fec3c03
parent5185a3c74ff90338ad30d39bef87259100bf13ad (diff)
GabbleVCardManager: don't expect that patched node exists in case of stream errors
-rw-r--r--src/vcard-manager.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/vcard-manager.c b/src/vcard-manager.c
index c1067cc1a..ad3a8b1bb 100644
--- a/src/vcard-manager.c
+++ b/src/vcard-manager.c
@@ -876,12 +876,12 @@ replace_reply_cb (GabbleConnection *conn,
DEBUG ("called: %s error", (error) ? "some" : "no");
- g_assert (priv->patched_vcard != NULL);
-
if (err)
{
/* We won't need our patched vcard after all */
- lm_message_node_unref (priv->patched_vcard);
+ if (priv->patched_vcard != NULL)
+ lm_message_node_unref (priv->patched_vcard);
+
priv->patched_vcard = NULL;
node = NULL;
@@ -891,6 +891,9 @@ replace_reply_cb (GabbleConnection *conn,
GabbleVCardCacheEntry *entry = cache_entry_get (manager,
base->self_handle);
+ /* We must have patched vcard by now */
+ g_assert (priv->patched_vcard != NULL);
+
/* Finally we may put the new vcard in the cache. */
lm_message_node_unref (entry->vcard_node);
entry->vcard_node = priv->patched_vcard;