From a3173f89e2cbec52df8e17d158b4a9be4d88c8b3 Mon Sep 17 00:00:00 2001
From: rbuj <robert.buj@gmail.com>
Date: Wed, 30 Dec 2020 18:08:20 +0100
Subject: ps backend: do not silence the warnings when rendering the page

---
 backend/ps/ev-spectre.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

(limited to 'backend/ps')

diff --git a/backend/ps/ev-spectre.c b/backend/ps/ev-spectre.c
index f29f7b2c..daa13d18 100644
--- a/backend/ps/ev-spectre.c
+++ b/backend/ps/ev-spectre.c
@@ -315,14 +315,14 @@ ps_document_render (EvDocument      *document,
 	spectre_page_render (ps_page, src, &data, &stride);
 	spectre_render_context_free (src);
 
-	if (!data) {
+	if (spectre_page_status (ps_page) != SPECTRE_STATUS_SUCCESS) {
+		g_warning ("libspectre reports: %s",
+		           spectre_status_to_string (spectre_page_status (ps_page)));
+		g_free (data);
 		return NULL;
 	}
 
-	if (spectre_page_status (ps_page)) {
-		g_warning ("%s", spectre_status_to_string (spectre_page_status (ps_page)));
-		g_free (data);
-
+	if (!data) {
 		return NULL;
 	}
 
-- 
cgit v1.2.1