aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/em-format-html-display.c15
2 files changed, 14 insertions, 7 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ec87d244bb..3f1a34db6e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,9 +1,13 @@
2004-02-25 Jeffrey Stedfast <fejj@ximian.com>
+ * em-format-html-display.c (efhd_attachment_button): Protect
+ against using NULL pixbufs. Gets rid of a lot of console warning
+ spewage on my system.
+
* em-folder-view.c (emfv_list_key_press): Removed Delete/KP_Delete
from here. Now handled via the bonobo-ui menu accels. Fixes bug #53504.
-2004-02-25 <rodo@ximian.com>
+2004-02-25 Radek Doulik <rodo@ximian.com>
* mail-session.c (main_get_filter_driver): set seen flag for junk
messages
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;