# HG changeset patch # User Christian Hammond # Date 1063573736 0 # Node ID bdc4e73f354dd93ac5d7c6584855aa945f1741f5 # Parent 551a8111977a99f147261c5c2111f7cc3dc196b4 [gaim-migrate @ 7384] Fixed a smiley crash. Thanks javabsp. committer: Tailor Script diff -r 551a8111977a -r bdc4e73f354d src/gtkimhtml.c --- a/src/gtkimhtml.c Sun Sep 14 21:06:32 2003 +0000 +++ b/src/gtkimhtml.c Sun Sep 14 21:08:56 2003 +0000 @@ -1385,10 +1385,11 @@ wpos = g_snprintf (ws, smilelen + 1, "%s", c); anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); pixbuf = gtk_smiley_tree_image(imhtml, sml, ws); - icon = gtk_image_new_from_animation(pixbuf); - g_object_unref(pixbuf); - gtk_widget_show(icon); - gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); + if(pixbuf){ + icon = gtk_image_new_from_animation(pixbuf); + gtk_widget_show(icon); + gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); + } c += smilelen; pos += smilelen;