changeset 23227:1bdf8223ba45

Prevent a crash when the imhtmltoolbar is disposed and the smiley dialog is open.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 27 May 2008 17:31:39 +0000
parents e166f9e91d6d
children b1e219ed4e1c
files pidgin/gtkimhtmltoolbar.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c	Tue May 27 10:39:37 2008 +0000
+++ b/pidgin/gtkimhtmltoolbar.c	Tue May 27 17:31:39 2008 +0000
@@ -1122,7 +1122,10 @@
 	}
 
 	destroy_toolbar_font(NULL, NULL, toolbar);
-	destroy_smiley_dialog(toolbar);
+	if (toolbar->smiley_dialog != NULL) {
+		g_signal_handlers_disconnect_by_func(G_OBJECT(toolbar->smiley_dialog), close_smiley_dialog, toolbar);
+		destroy_smiley_dialog(toolbar);
+	}
 	destroy_toolbar_bgcolor(NULL, NULL, toolbar);
 	destroy_toolbar_fgcolor(NULL, NULL, toolbar);
 	close_link_dialog(toolbar);