Commit 7ebfb898 authored by Marek Kašík's avatar Marek Kašík
Browse files

libview: Do not draw invalid surface

Check status of rendered surface for CAIRO_STATUS_INVALID_SIZE
in ev_job_render_run() before using it.
This prevents evince's UI to become corrupted when zooming in too much.
parent 851d1179
Pipeline #282336 passed with stage
in 6 minutes
......@@ -638,7 +638,8 @@ ev_job_render_run (EvJob *job)
job_render->surface = ev_document_render (job->document, rc);
if (job_render->surface == NULL) {
if (job_render->surface == NULL ||
cairo_surface_status (job_render->surface) == CAIRO_STATUS_INVALID_SIZE) {
ev_document_fc_mutex_unlock ();
ev_document_doc_mutex_unlock ();
g_object_unref (rc);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment