commit bcde37e89350aa6992e1bc2430d1b4f84165a0b4 parent 8fb446dda5e0d83166e3718a4a5e0ae1504985fa Author: Michael Rasmussen <mir@datanom.net> Date: Wed, 3 Jul 2019 20:35:17 +0200 If error is NULL print a static message instead Signed-off-by: Michael Rasmussen <mir@datanom.net> Diffstat:
| M | src/plugins/litehtml_viewer/lh_widget.cpp | | | 8 | ++++++-- |
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -484,8 +484,12 @@ GdkPixbuf *lh_widget::get_local_image(const litehtml::tstring url) const stream = procmime_get_part_as_inputstream(p, &error); if (error != NULL || stream == NULL) { - g_warning("Couldn't get image MIME part: %s\n", error->message); - g_error_free(error); + if (error != NULL) { + g_warning("Couldn't get image MIME part: %s\n", error->message); + g_error_free(error); + } else { + g_warning("Could not decode MIME part\n"); + } return NULL; }