aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-display.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-18 05:08:04 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-18 05:08:04 +0800
commit8b4ca6c023a17e7a8d7d7c3101d020765d0d0719 (patch)
treee3703d9c52598996bf5d6a8efc5fb80bb89ce42a /mail/mail-display.c
parentc56a8e8c2da02675ffd6a37969c11af751b0fc0f (diff)
downloadgsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.gz
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.bz2
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.lz
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.xz
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.zst
gsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.zip
If we fail to load the pixbuf, don't use it (stops some g_warnings).
2003-03-17 Jeffrey Stedfast <fejj@ximian.com> * mail-display.c (pixbuf_gen_idle): If we fail to load the pixbuf, don't use it (stops some g_warnings). svn path=/trunk/; revision=20319
Diffstat (limited to 'mail/mail-display.c')
-rw-r--r--mail/mail-display.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/mail/mail-display.c b/mail/mail-display.c
index 9ac15b4672..406a194df5 100644
--- a/mail/mail-display.c
+++ b/mail/mail-display.c
@@ -688,6 +688,23 @@ pixbuf_gen_idle (struct _PixbufLoader *pbl)
} else
pixbuf = gdk_pixbuf_loader_get_pixbuf (pbl->loader);
+ if (pixbuf == NULL) {
+ /* pixbuf is non-existant */
+ if (pbl->mstream)
+ camel_object_unref (pbl->mstream);
+
+ if (pbl->loader) {
+ gdk_pixbuf_loader_close (pbl->loader, NULL);
+ g_object_unref (pbl->loader);
+ }
+
+ g_free (pbl->type);
+ g_free (pbl->cid);
+ g_free (pbl);
+
+ return FALSE;
+ }
+
width = gdk_pixbuf_get_width (pixbuf);
height = gdk_pixbuf_get_height (pixbuf);