aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-format-html-display.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/em-format-html-display.c')
-rw-r--r--mail/em-format-html-display.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index d96259476e..5ca371c0dd 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -1256,12 +1256,15 @@ efhd_attachment_button(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObje
em_format_html_job_queue(efh, job);
}
} else {
- GdkPixbuf *pixbuf = e_icon_for_mime_type(simple_type, 24);
- GdkPixbuf *mini = gdk_pixbuf_scale_simple(pixbuf, 24, 24, GDK_INTERP_BILINEAR);
-
- gtk_image_set_from_pixbuf((GtkImage *)w, mini);
- g_object_unref(mini);
- g_object_unref(pixbuf);
+ GdkPixbuf *pixbuf, *mini;
+
+ if ((pixbuf = e_icon_for_mime_type (simple_type, 24))) {
+ if ((mini = gdk_pixbuf_scale_simple (pixbuf, 24, 24, GDK_INTERP_BILINEAR))) {
+ gtk_image_set_from_pixbuf ((GtkImage *) w, mini);
+ g_object_unref (mini);
+ }
+ g_object_unref (pixbuf);
+ }
}
drag_types[0].target = simple_type;