im.pidgin.pidgin: ea658359572b6c8c913d4f099d0072fc46ba2977

datallah at pidgin.im datallah at pidgin.im
Tue Nov 20 21:55:40 EST 2007


-----------------------------------------------------------------
Revision: ea658359572b6c8c913d4f099d0072fc46ba2977
Ancestor: 885a37451aa93393fbce4fae941cfc7ffa54960a
Author: datallah at pidgin.im
Date: 2007-11-21T02:53:27
Branch: im.pidgin.pidgin

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

ChangeLog: 

Prevent crashing when authorizing or denying after the account is disconnected.

-------------- next part --------------
============================================================
--- libpurple/protocols/jabber/presence.c	e5b18f5b76d46ea4b7adf784c2e0f8d709b6e595
+++ libpurple/protocols/jabber/presence.c	244be4e1a8a142434cae293487e2814f770094f7
@@ -308,8 +308,9 @@ static void authorize_add_cb(gpointer da
 static void authorize_add_cb(gpointer data)
 {
 	struct _jabber_add_permit *jap = data;
-	jabber_presence_subscription_set(jap->gc->proto_data, jap->who,
-			"subscribed");
+	if(PURPLE_CONNECTION_IS_VALID(jap->gc))
+		jabber_presence_subscription_set(jap->gc->proto_data,
+			jap->who, "subscribed");
 	g_free(jap->who);
 	g_free(jap);
 }
@@ -317,9 +318,9 @@ static void deny_add_cb(gpointer data)
 static void deny_add_cb(gpointer data)
 {
 	struct _jabber_add_permit *jap = data;
-	jabber_presence_subscription_set(jap->gc->proto_data, jap->who,
-			"unsubscribed");
-
+	if(PURPLE_CONNECTION_IS_VALID(jap->gc))
+		jabber_presence_subscription_set(jap->gc->proto_data,
+			jap->who, "unsubscribed");
 	g_free(jap->who);
 	g_free(jap);
 }


More information about the Commits mailing list