changeset 28592:923681c5406e

jabber: don't crash when right-clicking on buddies non on the local roster in non-anonymous MUCs (due to not finding a JabberBuddy when determining file transfer support)
author Marcus Lundblad <ml@update.uu.se>
date Tue, 17 Nov 2009 21:34:28 +0000
parents d537567d051f
children 1acb11145fa4 19e400679e61
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Tue Nov 17 19:10:17 2009 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Tue Nov 17 21:34:28 2009 +0000
@@ -3234,6 +3234,12 @@
 		GList *iter;
 		gboolean has_resources_without_caps = FALSE;
 
+		/* if we didn't find a JabberBuddy, we don't have presence for this
+		 buddy, let's assume they can receive files, disco should tell us
+		 when actually trying */
+		if (jb == NULL)
+			return TRUE;
+
 		/* find out if there is any resources without caps */
 		for (iter = jb->resources; iter ; iter = g_list_next(iter)) {
 			JabberBuddyResource *jbr = (JabberBuddyResource *) iter->data;