summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/ps/ev-spectre.c10
1 files changed, 5 insertions, 5 deletions
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;
}