talons

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

commit 098ecbb93756aee7147878a8ff457c9063faed5b
parent 66fccde959a1b4addee971412b35d4b51d8272b1
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 @@ -451,17 +451,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);