aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);