changeset 29526:fbefcfbb5377

jabber: Avoid crashing if a buddy has a NULL resource.
author Paul Aurich <paul@darkrain42.org>
date Thu, 04 Mar 2010 16:31:10 +0000
parents 418659eedf88
children 70de81d95bf3
files libpurple/protocols/jabber/buddy.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/buddy.c	Thu Mar 04 15:31:11 2010 +0000
+++ b/libpurple/protocols/jabber/buddy.c	Thu Mar 04 16:31:10 2010 +0000
@@ -218,7 +218,7 @@
 	for (l = jb->resources; l; l = l->next)
 	{
 		JabberBuddyResource *jbr = l->data;
-		if (g_str_equal(resource, jbr->name))
+		if (jbr->name && g_str_equal(resource, jbr->name))
 			return jbr;
 	}