aboutsummaryrefslogtreecommitdiffstats
path: root/protocols/jabber/presence.c
diff options
context:
space:
mode:
authorWilmer van der Gaast <wilmer@gaast.net>2007-04-17 19:49:49 -0700
committerWilmer van der Gaast <wilmer@gaast.net>2007-04-17 19:49:49 -0700
commit33dc2618520409c0d52efff335fe299c26f6dd42 (patch)
tree0a3f666452425e1e1be81d2401b236bc566acf44 /protocols/jabber/presence.c
parent9624fdf0d6f170d8caa7948fb1b3a138b05e1d8c (diff)
Fixed NULL pointer dereference in Jabber code.
Diffstat (limited to 'protocols/jabber/presence.c')
-rw-r--r--protocols/jabber/presence.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/jabber/presence.c b/protocols/jabber/presence.c
index 6bc8117f..f577e56a 100644
--- a/protocols/jabber/presence.c
+++ b/protocols/jabber/presence.c
@@ -73,7 +73,8 @@ xt_status jabber_pkt_presence( struct xt_node *node, gpointer data )
/* FIXME: What to send if there are other resources??? */
imcb_buddy_status( ic, bud->bare_jid, OPT_LOGGED_IN | is_away,
- bud->away_state->full_name, bud->away_message );
+ ( is_away && bud->away_state ) ? bud->away_state->full_name : NULL,
+ bud->away_message );
}
else if( strcmp( type, "unavailable" ) == 0 )
{