aboutsummaryrefslogtreecommitdiffstats
path: root/mail
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
parentc56a8e8c2da02675ffd6a37969c11af751b0fc0f (diff)
downloadgsoc2013-evolution-8b4ca6c023a17e7a8d7d7c3101d020765d0d0719.tar.gz
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')
-rw-r--r--mail/ChangeLog3
-rw-r--r--mail/mail-display.c17
2 files changed, 20 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 2bb3e4be10..a40d4ae6a1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,8 @@
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).
+
Part of a fix for bug #39809
* mail-vfolder.c (vfolder_edit): Don't add the cancel button here.
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);