pidgin: 0627a49f: Only call failure_cb if it exists for th...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Jun 18 16:15:48 EDT 2010


-----------------------------------------------------------------
Revision: 0627a49f54e3d5317e6a8dd97956ee2abfa32f9d
Ancestor: 63b644ac7791059c9fad6128d17bccebca8ad71a
Author: darkrain42 at pidgin.im
Date: 2010-06-18T20:12:41
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/0627a49f54e3d5317e6a8dd97956ee2abfa32f9d

Modified files:
        ChangeLog.API libpurple/account.c

ChangeLog: 

Only call failure_cb if it exists for the [gs]et_public_alias functions.

Craig "charding" Harding discovered (read: ran into the crash) this

-------------- next part --------------
============================================================
--- ChangeLog.API	aeaa49f1143187442db23d394344206ba021adef
+++ ChangeLog.API	7506e29b249f9ac031167def0f09de6b5bfb0cd3
@@ -1,6 +1,11 @@ version 2.7.2 (??/??/????):
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
 version 2.7.2 (??/??/????):
+	libpurple:
+		Fixed:
+		* purple_account_[gs]et_public_alias no longer crash when
+		  called for a protocol that doesn't support the underlying
+		  calls and the caller does not specify a failure callback.
 
 version 2.7.1 (05/29/2010):
 	* No changes
============================================================
--- libpurple/account.c	d8b86378c4aeae32fabdcaf478e904ec4c844526
+++ libpurple/account.c	950ac1ab9a1d7557336d39b6542200633483cd2b
@@ -1819,7 +1819,7 @@ purple_account_set_public_alias(PurpleAc
 
 	if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, set_public_alias))
 		prpl_info->set_public_alias(gc, alias, success_cb, failure_cb);
-	else {
+	else if (failure_cb) {
 		struct public_alias_closure *closure =
 				g_new0(struct public_alias_closure, 1);
 		closure->account = account;
@@ -1859,7 +1859,7 @@ purple_account_get_public_alias(PurpleAc
 
 	if (PURPLE_PROTOCOL_PLUGIN_HAS_FUNC(prpl_info, get_public_alias))
 		prpl_info->get_public_alias(gc, success_cb, failure_cb);
-	else {
+	else if (failure_cb) {
 		struct public_alias_closure *closure =
 				g_new0(struct public_alias_closure, 1);
 		closure->account = account;


More information about the Commits mailing list