changeset 10761:7c6b69eb82f2

[gaim-migrate @ 12365] background colors don't crash anymore committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 29 Mar 2005 15:12:14 +0000
parents f93ed7f6ecc7
children 019229bf8b7e
files src/gtkimhtml.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtml.c	Mon Mar 28 04:26:33 2005 +0000
+++ b/src/gtkimhtml.c	Tue Mar 29 15:12:14 2005 +0000
@@ -2321,9 +2321,10 @@
 						if ((font->size != 3) && (imhtml->format_functions & (GTK_IMHTML_GROW|GTK_IMHTML_SHRINK)))
 							gtk_imhtml_font_set_size(imhtml, 3);
 
+
+						fonts = g_slist_remove (fonts, font);
 						g_free(font);
 
-						fonts = fonts->next;
 						if (fonts) {
 							GtkIMHtmlFontDetail *font = fonts->data;
 
@@ -3814,9 +3815,12 @@
 	GObject *object;
 	GtkTextIter start, end;
 	struct backcolor_tag *bct = NULL;
+
 	if (imhtml->edit.backcolor != NULL)
 		g_free(imhtml->edit.backcolor);
 
+	imhtml->edit.backcolor = NULL;
+
 	if (color && strcmp(color, "") != 0) {
 		imhtml->edit.backcolor = g_strdup(color);