changeset 19425:4fced00fdc9f

merge of '3b5ffa9dc2dec5443f83a219ac14382a0e3ccf03' and '6f352e89294bdd1ce546d3a5db327e7fc965b095'
author Jeffrey Connelly <jaconnel@calpoly.edu>
date Sat, 25 Aug 2007 05:41:25 +0000
parents 1096aea98217 (current diff) 93dfc16efbda (diff)
children 6395c2e96bc2
files
diffstat 1 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/blist.c	Sat Aug 25 01:14:56 2007 +0000
+++ b/libpurple/blist.c	Sat Aug 25 05:41:25 2007 +0000
@@ -1191,8 +1191,11 @@
 			purple_blist_add_group(group,
 					purple_blist_get_last_sibling(purplebuddylist->root));
 		} else {
-			/* Fail if tried to add buddy to a group that isn't on the blist. #2752. */
-			g_return_if_fail(purple_find_group(group->name));
+			/* Add group to blist if isn't already on it. Fixes #2752. */
+			if (!purple_find_group(group->name)) {
+				purple_blist_add_group(group,
+						purple_blist_get_last_sibling(purplebuddylist->root));
+			}
 		}
 	} else {
 		group = (PurpleGroup*)node->parent;
@@ -1287,9 +1290,11 @@
 		g = (PurpleGroup *)((PurpleBlistNode *)c)->parent;
 	} else {
 		if (group) {
-			/*  Fail if trying to add buddy to a group that is not on the buddy list. 
-			 *  Fix for #2752. */
-			g_return_if_fail(purple_find_group(group->name));
+			/* Add chat to blist if isn't already on it. Fixes #2752. */
+			if (!purple_find_group(group->name)) {
+				purple_blist_add_group(group,
+						purple_blist_get_last_sibling(purplebuddylist->root));
+			}
 
 			g = group;
 		} else {