talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 32e4bbe817586dfabb3e83265ecbcb45b3eadf3e
parent 95bd2a18ed7da8754ee4445ca24d6b196147031c
Author: Colin Leroy <colin@colino.net>
Date:   Sun,  7 Jul 2019 10:51:55 +0200

litehtml_viewer: use new procmime_get_part_as_pixbuf helper function

Diffstat:
Msrc/plugins/litehtml_viewer/lh_widget.cpp | 10+---------
1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/src/plugins/litehtml_viewer/lh_widget.cpp b/src/plugins/litehtml_viewer/lh_widget.cpp @@ -479,17 +479,9 @@ GdkPixbuf *lh_widget::get_local_image(const litehtml::tstring url) const strlen(p->id) >= len + 2 && !strncasecmp(name, p->id + 1, len) && *(p->id + len + 1) == '>') { - GInputStream *stream; GError *error = NULL; - stream = procmime_get_part_as_inputstream(p); - if (stream == NULL) { - g_warning("Could not decode MIME part\n"); - return NULL; - } - - pixbuf = gdk_pixbuf_new_from_stream(stream, NULL, &error); - g_object_unref(stream); + pixbuf = procmime_get_part_as_pixbuf(p, &error); if (error != NULL) { g_warning("Couldn't load image: %s\n", error->message); g_error_free(error);