diff src/dialogs.c @ 5970:730015652f4d

[gaim-migrate @ 6417] Fixes one of those GDK warning things. Happened when clicking cancel on select font dialog for conversations. Problem was gtk_widget_destroy was getting called twice for gtkconv->dialogs.font, second time being passed NULL. This font stuff is ugly, IMHO. Like, look at show_font_dialog. Yeesh. No code re-use whatsoever. That function should either be split up or made to suck less. One of gai'ms young aspiring actors should take care of that. Aren't there always people that are like, "I want to code something but don't know what to do?!??" Well there you go. I also changed a bit o' proxy.c code in an attempt to fix KimuSan^'s problem. I'm not really sure what his problem is, but I have a strong feeling that the lines I changed are better the way they are now. If I'm wrong, someone should probably correct me. But if I'm right... we'll lets just say we'll all be a whole lot thinner. "And somebody get this walking carpet out of my way." "No reward is worth this." committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 28 Jun 2003 17:15:23 +0000
parents 5fb6bd688a5b
children 80e5258226f3
line wrap: on
line diff
--- a/src/dialogs.c	Sat Jun 28 08:51:44 2003 +0000
+++ b/src/dialogs.c	Sat Jun 28 17:15:23 2003 +0000
@@ -3124,9 +3124,11 @@
 			GTK_TOGGLE_BUTTON(gtkconv->toolbar.font), FALSE);
 	}
 
-	dialogwindows = g_list_remove(dialogwindows, gtkconv->dialogs.font);
-	gtk_widget_destroy(gtkconv->dialogs.font);
-	gtkconv->dialogs.font = NULL;
+	if (gtkconv->dialogs.font) {
+		dialogwindows = g_list_remove(dialogwindows, gtkconv->dialogs.font);
+		gtk_widget_destroy(gtkconv->dialogs.font);
+		gtkconv->dialogs.font = NULL;
+	}
 }
 
 void apply_font(GtkWidget *widget, GtkFontSelection *fontsel)