Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview
diff options
context:
space:
mode:
authorCarlos Garcia Campos <carlosgc@gnome.org>2009-12-20 16:38:46 (GMT)
committer Carlos Garcia Campos <carlosgc@gnome.org>2009-12-20 16:38:46 (GMT)
commitbf8fe0d26b7319b9ad3a8a79fbf618343f603c62 (patch)
tree1f19081855cd1ab4eaf115848e0cfc65afecdbc5 /libview
parent0f39465dc52c56bc5c554a563f89d2f632ca54f0 (diff)
[libview] Fix a crash with document that contain no pages or empty pages
Fixes bgo#605029.
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 735ad13..7a3a6dc 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -637,7 +637,11 @@ view_update_range_and_current_page (EvView *view)
{
gint start = view->start_page;
gint end = view->end_page;
-
+
+ if (ev_document_get_n_pages (view->document) <= 0 ||
+ !ev_document_check_dimensions (view->document))
+ return;
+
/* Presentation trumps all other modes */
if (view->presentation) {
view->start_page = view->current_page;