commit 8fb446dda5e0d83166e3718a4a5e0ae1504985fa
parent 7b996f775c123d29cdcfc0a117de1bd3e0d06867
Author: Michael Rasmussen <mir@datanom.net>
Date: Wed, 3 Jul 2019 20:16:44 +0200
Since procmime_get_part_as_inputstream can return NULL and never touches error we need to bail if stream is NULL
Signed-off-by: Michael Rasmussen <mir@datanom.net>
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp
@@ -483,7 +483,7 @@ GdkPixbuf *lh_widget::get_local_image(const litehtml::tstring url) const
GError *error = NULL;
stream = procmime_get_part_as_inputstream(p, &error);
- if (error != NULL) {
+ if (error != NULL || stream == NULL) {
g_warning("Couldn't get image MIME part: %s\n", error->message);
g_error_free(error);
return NULL;