From: Michael Rasmussen Date: Wed, 3 Jul 2019 18:16:44 +0000 (+0200) Subject: Since procmime_get_part_as_inputstream can return NULL and never touches error we... X-Git-Tag: 3.17.4~17 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=6c147254b417562c8ccec22b2567cbe8aae4d232 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 --- diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp index fb2d2a640..436bb76fe 100644 --- a/src/plugins/litehtml_viewer/lh_widget.cpp +++ b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -455,7 +455,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;