changeset 22878:db31bbdf355b

Make sure deleting one smiley doesn't accidentally delete a few others.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Tue, 19 Feb 2008 20:00:29 +0000
parents 76fa93017695
children 01e181575f27
files pidgin/gtksmiley.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtksmiley.c	Tue Feb 19 19:57:09 2008 +0000
+++ b/pidgin/gtksmiley.c	Tue Feb 19 20:00:29 2008 +0000
@@ -132,11 +132,11 @@
 			continue;
 
 		destroy_gtksmiley(gtksmiley);
-		list = g_slist_delete_link(list, list);
 		break;
 	}
 
-	gtk_smileys = list;
+	if (list)
+		gtk_smileys = g_slist_delete_link(gtk_smileys, list);
 }
 
 void pidgin_smileys_init(void)