summaryrefslogtreecommitdiff
path: root/libview/ev-view.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <[email protected]>2013-07-03 18:59:16 +0200
committerraveit65 <[email protected]>2017-09-06 18:25:34 +0200
commitd7d45381c5fc30f44086acf4ce6ae4b881ae7ff4 (patch)
tree1e0344a1a59d2f1285a2c5152bb6b5b27c4bbfce /libview/ev-view.c
parent4eb7cc70ec92ea11d7facd0e7f8c4556fd9f1746 (diff)
downloadatril-d7d45381c5fc30f44086acf4ce6ae4b881ae7ff4.tar.bz2
atril-d7d45381c5fc30f44086acf4ce6ae4b881ae7ff4.tar.xz
libview: Return NULL instead of empty regions from the pixbuf cache
This way we just need to check the pointer returned. origin commit: https://git.gnome.org/browse/evince/commit/?h=gnome-3-10&id=bf18b54
Diffstat (limited to 'libview/ev-view.c')
-rw-r--r--libview/ev-view.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index f0f24377..4122d391 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -7631,9 +7631,8 @@ merge_selection_region (EvView *view,
tmp_region = ev_pixbuf_cache_get_selection_region (view->pixbuf_cache,
cur_page,
view->scale);
- if (tmp_region && !cairo_region_is_empty (tmp_region)) {
- new_sel->covered_region = cairo_region_reference (tmp_region);
- }
+ if (tmp_region)
+ new_sel->covered_region = cairo_region_reference (tmp_region);
}
/* Now we figure out what needs redrawing */