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

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