Sun, 14 Sep 2003 21:08:56 +0000
[gaim-migrate @ 7384]
Fixed a smiley crash. Thanks javabsp.
committer: Christian Hammond <chipx86@chipx86.com>
| src/gtkimhtml.c | file | annotate | diff | comparison | revisions |
--- 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;