diff options
author | Matvey Soloviev <[email protected]> | 2014-08-21 04:33:12 -0400 |
---|---|---|
committer | infirit <[email protected]> | 2014-09-25 13:51:49 +0200 |
commit | cd3a1af793824e33d26efa4fe709316d5617373d (patch) | |
tree | ad4bcc920592c78e0ff0bb0728ba0b72a8e77dfb | |
parent | 6b13afb617b32c7832c088ea62ab9125e276d0ec (diff) | |
download | atril-cd3a1af793824e33d26efa4fe709316d5617373d.tar.bz2 atril-cd3a1af793824e33d26efa4fe709316d5617373d.tar.xz |
Fix crash when clicking empty canvas while loading.
-rw-r--r-- | libview/ev-pixbuf-cache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libview/ev-pixbuf-cache.c b/libview/ev-pixbuf-cache.c index 367f70d7..9741e434 100644 --- a/libview/ev-pixbuf-cache.c +++ b/libview/ev-pixbuf-cache.c @@ -88,7 +88,7 @@ static gboolean new_selection_surface_needed(EvPixbufCache *pixbuf_cac #define VISIBLE_NEXT_LEN(pixbuf_cache) \ (MIN(pixbuf_cache->preload_cache_size, ev_document_get_n_pages (pixbuf_cache->document) - (1 + pixbuf_cache->end_page))) #define PAGE_CACHE_LEN(pixbuf_cache) \ - ((pixbuf_cache->end_page - pixbuf_cache->start_page) + 1) + (pixbuf_cache->start_page>=0?((pixbuf_cache->end_page - pixbuf_cache->start_page) + 1):0) #define MAX_PRELOADED_PAGES 3 |