pidgin: 155eaff6: Fix reversed logic in the gevolution plu...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Fri Aug 28 23:00:48 EDT 2009


-----------------------------------------------------------------
Revision: 155eaff66198bb519898da8e7071925567efc279
Ancestor: 8e3f07ee41e0a06ef01e353e2162d8fcf3d6bb33
Author: darkrain42 at pidgin.im
Date: 2009-08-29T02:29:53
Date: 2009-08-29T02:31:33
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/155eaff66198bb519898da8e7071925567efc279

Modified files:
        pidgin/plugins/gevolution/gevo-util.c

ChangeLog: 

Fix reversed logic in the gevolution plugin that led to a crash. Fixes #10115.

ChangeLog: 

Fix what looks like an incorrect merge that caused gevolution's add buddy dialog to segfault.

-------------- next part --------------
============================================================
--- pidgin/plugins/gevolution/gevo-util.c	d0cffc6391abe27bb758eb0f777b2405be054511
+++ pidgin/plugins/gevolution/gevo-util.c	c93acc60d8070e8d5687baccd3ab8d5f25b32619
@@ -35,14 +35,16 @@ gevo_add_buddy(PurpleAccount *account, c
 
 	conv = purple_find_conversation_with_account(PURPLE_CONV_TYPE_IM, buddy_name, account);
 
-	if ((group = purple_find_group(group_name)) == NULL)
+	group = purple_find_group(group_name);
+	if (group == NULL)
 	{
 		group = purple_group_new(group_name);
 		purple_blist_add_group(group, NULL);
 	}
 
-	if ((buddy = purple_find_buddy_in_group(account, buddy_name, group)))
-	{	
+	buddy = purple_find_buddy_in_group(account, buddy_name, group);
+	if (buddy == NULL)
+	{
 		buddy = purple_buddy_new(account, buddy_name, alias);
 		purple_blist_add_buddy(buddy, NULL, group, NULL);
 	}


More information about the Commits mailing list