summaryrefslogtreecommitdiff
path: root/src/gabble-presence-cache.c
diff options
context:
space:
mode:
author <robert.mcqueen@collabora.co.uk>2006-07-19 15:42:33 +0000
committer <robert.mcqueen@collabora.co.uk>2006-07-19 15:42:33 +0000
commit51faef414ef27035adc11e3000f3eb5a18486b51 (patch)
treed99a1c7bb3958a2507aa9799534b8fb4cd3c2f7f /src/gabble-presence-cache.c
parentc0077b4d2fa0652b28a333750ebc9172ae32eece (diff)
check for NULL <priority> elements in incoming presence
Diffstat (limited to 'src/gabble-presence-cache.c')
-rw-r--r--src/gabble-presence-cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gabble-presence-cache.c b/src/gabble-presence-cache.c
index 681bb4cfa..c724f055e 100644
--- a/src/gabble-presence-cache.c
+++ b/src/gabble-presence-cache.c
@@ -441,7 +441,9 @@ _parse_presence_message (GabblePresenceCache *cache,
if (child_node)
{
const gchar *prio = lm_message_node_get_value (child_node);
- priority = CLAMP (atoi (prio), G_MININT8, G_MAXINT8);
+
+ if (prio != NULL)
+ priority = CLAMP (atoi (prio), G_MININT8, G_MAXINT8);
}
switch (lm_message_get_sub_type (message))