changeset 1364:ce379d65a5e3

[gaim-migrate @ 1374] update group numbers for real committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Fri, 22 Dec 2000 14:36:49 +0000
parents b454b1d084ce
children 6a752e171b26
files src/buddy.c
diffstat 1 files changed, 15 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Fri Dec 22 14:35:32 2000 +0000
+++ b/src/buddy.c	Fri Dec 22 14:36:49 2000 +0000
@@ -492,6 +492,16 @@
 	 * via the UI
 	 */
 
+	grp = g_slist_find(gc->groups, rem_g);
+        delg = (struct group *)grp->data;
+        mem = delg->members;
+	
+        mem = g_slist_find(mem, rem_b);
+        delb = (struct buddy *)mem->data;
+	
+        delg->members = g_slist_remove(delg->members, delb);
+        serv_remove_buddy(gc, delb->name);
+
 	gs = find_group_show(rem_g->name);
 	if (gs) {
 		bs = find_buddy_show(gs, rem_b->name);
@@ -517,25 +527,16 @@
 						update_num_group(gs);
 				} else
 					update_num_group(gs);
-			}
-		}
+			} else
+				update_num_group(gs);
+		} else
+			update_num_group(gs);
 	}
 
-	grp = g_slist_find(gc->groups, rem_g);
-        delg = (struct group *)grp->data;
-        mem = delg->members;
-	
-        mem = g_slist_find(mem, rem_b);
-        delb = (struct buddy *)mem->data;
-	
-        delg->members = g_slist_remove(delg->members, delb);
-        serv_remove_buddy(gc, delb->name);
 	c = find_conversation(delb->name);
-        g_free(delb);
-	mem = delg->members;
-
 	if (c)
 		update_buttons_by_protocol(c);
+        g_free(delb);
 
 	// flush buddy list to cache