pidgin: a878de35: jabber: don't crash when right-clicking ...

malu at pidgin.im malu at pidgin.im
Tue Nov 17 16:36:14 EST 2009


-----------------------------------------------------------------
Revision: a878de35a8972daab016ed05e7af50043bd856ca
Ancestor: d2984fa9ffdaa63b01cc1e0d94aec5622cd080c1
Author: malu at pidgin.im
Date: 2009-11-17T21:34:28
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/a878de35a8972daab016ed05e7af50043bd856ca

Modified files:
        libpurple/protocols/jabber/jabber.c

ChangeLog: 

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)

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/jabber.c	41d392fd2ac5e1947015c8dc021862b98e910f1d
+++ libpurple/protocols/jabber/jabber.c	80eb4367a92a0b7ae0d294d52a96c6cd65dcca04
@@ -3234,6 +3234,12 @@ gboolean jabber_can_receive_file(PurpleC
 		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;


More information about the Commits mailing list