diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-02-26 05:11:48 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-02-26 05:11:48 +0800 |
commit | b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542 (patch) | |
tree | a5430a6bb0e3c0e3fd85e9fbe5eaacf369dc9fed | |
parent | 6db6379e350eb77cd0b099bc97c43dee1a869ce3 (diff) | |
download | gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar.gz gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar.bz2 gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar.lz gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar.xz gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.tar.zst gsoc2013-evolution-b75230fcd89e0dc054e8744cbdc1d3fdbd1c3542.zip |
Protect against using NULL pixbufs. Gets rid of a lot of console warning
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.
svn path=/trunk/; revision=24873
-rw-r--r-- | mail/ChangeLog | 6 | ||||
-rw-r--r-- | mail/em-format-html-display.c | 15 |
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; |