changeset 12047:0b7ec6a106d5

[gaim-migrate @ 14342] Possible crash fix from Fernando Herrera. I'm not sure when this would crash, exactly. Maybe if you pass something invalid to gtk_image_new committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 12 Nov 2005 14:07:42 +0000
parents 2901da400741
children 6a95efdd1414
files src/gtkconv.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkconv.c	Sat Nov 12 02:42:14 2005 +0000
+++ b/src/gtkconv.c	Sat Nov 12 14:07:42 2005 +0000
@@ -4756,9 +4756,10 @@
 	for (current = smiley->anchors; current != NULL; current = g_slist_next(current)) {
 
 		icon = gtk_image_new_from_animation(smiley->icon);
-		gtk_widget_show(icon);
 
 		if (icon) {
+			gtk_widget_show(icon);
+
 			anchor = GTK_TEXT_CHILD_ANCHOR(current->data);
 
 			g_object_set_data_full(G_OBJECT(anchor), "gtkimhtml_plaintext", g_strdup(gaim_unescape_html(smile)), g_free);