summaryrefslogtreecommitdiff
path: root/libview/ev-pixbuf-cache.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-12-30 20:24:44 +0100
committerraveit65 <[email protected]>2021-01-07 20:37:14 +0100
commit21dfebaac3f2edfb0805b61de950859e36b53289 (patch)
tree1f1ccd0c62f9529c48f225be35e61ec6369b33f5 /libview/ev-pixbuf-cache.c
parenta3173f89e2cbec52df8e17d158b4a9be4d88c8b3 (diff)
downloadatril-21dfebaac3f2edfb0805b61de950859e36b53289.tar.bz2
atril-21dfebaac3f2edfb0805b61de950859e36b53289.tar.xz
Check whether the document page failed to render
Diffstat (limited to 'libview/ev-pixbuf-cache.c')
-rw-r--r--libview/ev-pixbuf-cache.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index 46031d7e..3c034343 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -327,6 +327,12 @@ job_finished_cb (EvJob *job,
job_info = find_job_cache (pixbuf_cache, job_render->page);
+ if (ev_job_is_failed (job)) {
+ job_info->job = NULL;
+ g_object_unref (job);
+ return;
+ }
+
copy_job_to_job_info (job_render, job_info, pixbuf_cache);
g_signal_emit (pixbuf_cache, signals[JOB_FINISHED], 0, job_info->region);
}