commit bcb0c74e062af68754f1f430bb7f0b65407cea61
parent 27534b6ba53ff71d4bb935490db9e6e64c7a820f
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:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/procmime.c b/src/procmime.c
@@ -2789,8 +2789,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);