summaryrefslogtreecommitdiff
path: root/libview
diff options
context:
space:
mode:
authorinfirit <[email protected]>2014-12-09 15:48:51 +0100
committerinfirit <[email protected]>2014-12-09 23:02:28 +0100
commit0f7517f8ba18c8952d052e6d23a3822b3d9f4ec6 (patch)
tree5d378fda46f91f4bf5e66c00a37a7c33711a3845 /libview
parentee9488f9111aa174d6dd3e17c38ad1c76876dd2f (diff)
downloadatril-0f7517f8ba18c8952d052e6d23a3822b3d9f4ec6.tar.bz2
atril-0f7517f8ba18c8952d052e6d23a3822b3d9f4ec6.tar.xz
libview: return early when print job was cancelled during page rendering
Taken from evince commit: ae4835dbed02ae928d96fb6360f7d5c62416044b From: Carlos Garcia Campos <[email protected]>
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-jobs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libview/ev-jobs.c b/libview/ev-jobs.c
index 84ab83ae..c95e7715 100644
--- a/libview/ev-jobs.c
+++ b/libview/ev-jobs.c
@@ -1729,6 +1729,9 @@ ev_job_print_run (EvJob *job)
ev_document_doc_mutex_unlock ();
+ if (g_cancellable_is_cancelled (job->cancellable))
+ return FALSE;
+
cr_status = cairo_status (job_print->cr);
if (cr_status == CAIRO_STATUS_SUCCESS) {
ev_job_succeeded (job);