From 19176513584bf26fa69a8a946982d9c521038a17 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Wed, 3 Jun 2009 17:10:36 +0100 Subject: Fixed a bug that caused crashes when joining certain kinds of Google Talk chatrooms. Doesn't seem to be Google Talk specific, other than that this is the first time I see empty elements that cause this crash. A more proper/efficient fix may be to just move the break outside the inner if. --- protocols/jabber/conference.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'protocols') diff --git a/protocols/jabber/conference.c b/protocols/jabber/conference.c index 480006bd..08bef4f5 100644 --- a/protocols/jabber/conference.c +++ b/protocols/jabber/conference.c @@ -233,8 +233,10 @@ void jabber_chat_pkt_presence( struct im_connection *ic, struct jabber_buddy *bu if( ( s = xt_find_attr( c, "xmlns" ) ) && ( strcmp( s, XMLNS_MUC_USER ) == 0 ) ) { - c = xt_find_node( c->children, "item" ); - if( ( s = xt_find_attr( c, "jid" ) ) ) + struct xt_node *item; + + item = xt_find_node( c->children, "item" ); + if( ( s = xt_find_attr( item, "jid" ) ) ) { /* Yay, found what we need. :-) */ bud->ext_jid = jabber_normalize( s ); -- cgit v1.2.3