[Commits] [SCM] claws branch, master, updated. 3.17.3-192-gc577fa6
Colin
colin at claws-mail.org
Sun Jul 7 12:22:10 CEST 2019
The branch, master has been updated
via c577fa6a1d5764e7086214d622a003b3716cc44a (commit)
from 098ecbb93756aee7147878a8ff457c9063faed5b (commit)
Summary of changes:
src/procmime.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
- Log -----------------------------------------------------------------
commit c577fa6a1d5764e7086214d622a003b3716cc44a
Author: Colin Leroy <colin at colino.net>
Date: Sun Jul 7 12:21:50 2019 +0200
procmime_get_part_as_pixbuf: set error if we can't decode part.
diff --git a/src/procmime.c b/src/procmime.c
index 1f126ec..cfcc642 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -2746,19 +2746,22 @@ GdkPixbuf *procmime_get_part_as_pixbuf(MimeInfo *mimeinfo, GError **error)
GdkPixbuf *pixbuf;
GInputStream *stream;
- *error = NULL;
+ if (error)
+ *error = NULL;
stream = procmime_get_part_as_inputstream(mimeinfo);
if (stream == NULL) {
+ if (*error)
+ *error = g_error_new_literal(G_FILE_ERROR, -1, _("Could not decode part"));
return NULL;
}
pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, error);
g_object_unref(stream);
- if (*error != NULL) {
+ if (*error != NULL)
return NULL;
- }
+
return pixbuf;
}
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list