Blame SOURCES/libgxps-0.3.0-clear-error.patch

dcdbf8
From 672c65ea8cbd2bcfd82a6b6498a4f1eb9daf5ec5 Mon Sep 17 00:00:00 2001
dcdbf8
From: Carlos Garcia Campos <carlosgc@gnome.org>
dcdbf8
Date: Fri, 8 Dec 2017 11:20:25 +0100
dcdbf8
Subject: [PATCH 2/2] gxps-images: clear the error before trying to load an
dcdbf8
 image again
dcdbf8
dcdbf8
In gxps_images_get_image() we first try with the image file extension,
dcdbf8
and if that fails then we try guessing the content type. If the image
dcdbf8
load failed the first time, the GError might be filled already, so we
dcdbf8
need to clear it before passing it to create functions again.
dcdbf8
---
dcdbf8
 libgxps/gxps-images.c | 2 ++
dcdbf8
 1 file changed, 2 insertions(+)
dcdbf8
dcdbf8
diff --git a/libgxps/gxps-images.c b/libgxps/gxps-images.c
dcdbf8
index 19cb1c0..4dcf9e2 100644
dcdbf8
--- a/libgxps/gxps-images.c
dcdbf8
+++ b/libgxps/gxps-images.c
dcdbf8
@@ -925,6 +925,8 @@ gxps_images_get_image (GXPSArchive *zip,
dcdbf8
 	if (!image) {
dcdbf8
 		gchar *mime_type;
dcdbf8
 
dcdbf8
+                g_clear_error(error);
dcdbf8
+
dcdbf8
 		mime_type = gxps_images_guess_content_type (zip, image_uri);
dcdbf8
 		if (g_strcmp0 (mime_type, "image/png") == 0) {
dcdbf8
 			image = gxps_images_create_from_png (zip, image_uri, error);
dcdbf8
-- 
dcdbf8
2.17.1
dcdbf8