summaryrefslogtreecommitdiff
path: root/libview/ev-pixbuf-cache.c
diff options
context:
space:
mode:
Diffstat (limited to 'libview/ev-pixbuf-cache.c')
-rw-r--r--libview/ev-pixbuf-cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c
index c6844f64..5706ab44 100644
--- a/libview/ev-pixbuf-cache.c
+++ b/libview/ev-pixbuf-cache.c
@@ -1121,7 +1121,8 @@ ev_pixbuf_cache_get_selection_region (EvPixbufCache *pixbuf_cache,
* assumption that it'll be updated later and we can scale it as need
* be */
if (job_info->job && EV_JOB_RENDER (job_info->job)->include_selection)
- return job_info->selection_region;
+ return job_info->selection_region && !cairo_region_is_empty(job_info->selection_region) ?
+ job_info->selection_region : NULL;
/* Now, lets see if we need to resize the region. If we do, we clear the
* old one. */
@@ -1150,7 +1151,8 @@ ev_pixbuf_cache_get_selection_region (EvPixbufCache *pixbuf_cache,
g_object_unref (rc);
ev_document_doc_mutex_unlock ();
}
- return job_info->selection_region;
+ return job_info->selection_region && !cairo_region_is_empty(job_info->selection_region) ?
+ job_info->selection_region : NULL;
}
static void