talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 10af5adebb7a268f7294f51752b0227726efe181
parent 4da0c05d2715f855ca78c98b2187688919dbfc0c
Author: Michael Rasmussen <mir@datanom.net>
Date:   Sun,  7 Jul 2019 19:06:34 +0200

Return decode error in GError if pointer to GError structure provided

Signed-off-by: Michael Rasmussen <mir@datanom.net>

Diffstat:
Msrc/procmime.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/procmime.c b/src/procmime.c @@ -2750,8 +2750,11 @@ GdkPixbuf *procmime_get_part_as_pixbuf(MimeInfo *mimeinfo, GError **error) *error = NULL; stream = procmime_get_part_as_inputstream(mimeinfo); - if (stream == NULL) + 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);