aboutsummaryrefslogtreecommitdiffstats
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
parent9624fdf0d6f170d8caa7948fb1b3a138b05e1d8c (diff)
Fixed NULL pointer dereference in Jabber code.
-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 )
{
'>122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203