changeset 4865:3bc5a65728fb

[gaim-migrate @ 5195] this should hopefully fix the hanging of gaim when you drag buddies around committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 22 Mar 2003 21:56:48 +0000
parents aedb32c5a920
children 703e02e52262
files src/list.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/list.c	Sat Mar 22 18:56:29 2003 +0000
+++ b/src/list.c	Sat Mar 22 21:56:48 2003 +0000
@@ -201,6 +201,11 @@
 	struct group *g = group;
 	struct gaim_blist_ui_ops *ops = gaimbuddylist->ui_ops;
 	gboolean save = FALSE;
+
+	/* if we're moving to overtop of ourselves, do nothing */
+	if((GaimBlistNode*)buddy == node)
+		return;
+
 	if (!n) {
 		if (!g) {
 			g = gaim_group_new(_("Buddies"));
@@ -216,14 +221,14 @@
 		ops->remove(gaimbuddylist, (GaimBlistNode*)buddy);
 		node2 = ((GaimBlistNode*)buddy)->next;
 		node3 = ((GaimBlistNode*)buddy)->prev;
-		
+
 		if (node2)
 			node2->prev = node3;
 		if (node3)
 			node3->next = node2;
 
 		if (((GaimBlistNode*)buddy)->parent != n->parent)
-			serv_move_buddy(buddy, (struct group*)((GaimBlistNode*)buddy)->parent, 
+			serv_move_buddy(buddy, (struct group*)((GaimBlistNode*)buddy)->parent,
 					(struct group*)n->parent);
 		save = TRUE;
 	}
@@ -242,7 +247,7 @@
 
 	if (ops)
 		ops->update(gaimbuddylist, (GaimBlistNode*)buddy);
-	if (save) 
+	if (save)
 		gaim_blist_save();
 }