changeset 8785:a871dec1c9d6

[gaim-migrate @ 9547] Kevin Stange's previous patch was carefully designed to prevent the crash by creating a worse one. This is roughly how I make food. His new patch should crash less, and I should get some pizza. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sat, 24 Apr 2004 00:28:39 +0000
parents 48dd097eb475
children f3d063680a45
files src/gtkimhtmltoolbar.c
diffstat 1 files changed, 29 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkimhtmltoolbar.c	Fri Apr 23 23:35:55 2004 +0000
+++ b/src/gtkimhtmltoolbar.c	Sat Apr 24 00:28:39 2004 +0000
@@ -753,11 +753,35 @@
 		toolbar->image_dialog = NULL;
 	}
 
-	close_link_dialog(toolbar);
-	close_smiley_dialog(NULL, NULL, toolbar);
-	destroy_toolbar_font(NULL, NULL, toolbar);
-	destroy_toolbar_fgcolor(NULL, NULL, toolbar);
-	destroy_toolbar_bgcolor(NULL, NULL, toolbar);
+	if (toolbar->font_dialog != NULL)
+	{
+		gtk_widget_destroy(toolbar->font_dialog);
+		toolbar->font_dialog = NULL;
+	}
+
+	if (toolbar->smiley_dialog != NULL)
+	{
+		gtk_widget_destroy(toolbar->smiley_dialog);
+		toolbar->smiley_dialog = NULL;
+	}
+
+	if (toolbar->bgcolor_dialog != NULL)
+	{
+		gtk_widget_destroy(toolbar->bgcolor_dialog);
+		toolbar->bgcolor_dialog = NULL;
+	}
+
+	if (toolbar->fgcolor_dialog != NULL)
+	{
+		gtk_widget_destroy(toolbar->fgcolor_dialog);
+		toolbar->fgcolor_dialog = NULL;
+	}
+
+	if (toolbar->link_dialog != NULL)
+	{
+		gaim_request_close(GAIM_REQUEST_FIELDS, toolbar->link_dialog);
+		toolbar->link_dialog = NULL;
+	}
 
 	if (toolbar->sml)
 		free(toolbar->sml);