projects
/
claws.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c577fa6
)
Fix dereferencing of potentially NULL *error
author
Colin Leroy
<colin@colino.net>
Sun, 7 Jul 2019 16:44:54 +0000
(18:44 +0200)
committer
Colin Leroy
<colin@colino.net>
Sun, 7 Jul 2019 16:44:54 +0000
(18:44 +0200)
src/procmime.c
patch
|
blob
|
history
diff --git
a/src/procmime.c
b/src/procmime.c
index cfcc6428e0fb4d53f679d33be7590ab09ba03193..cc641c6f3f1585962f494cf881a21a6743070e85 100644
(file)
--- a/
src/procmime.c
+++ b/
src/procmime.c
@@
-2750,16
+2750,13
@@
GdkPixbuf *procmime_get_part_as_pixbuf(MimeInfo *mimeinfo, GError **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"));
+ if (stream == NULL)
return NULL;
- }
pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, error);
g_object_unref(stream);
- if (*error != NULL)
+ if (
error &&
*error != NULL)
return NULL;
return pixbuf;