diff options
author | Carlos 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) |
commit | bf8fe0d26b7319b9ad3a8a79fbf618343f603c62 (patch) | |
tree | 1f19081855cd1ab4eaf115848e0cfc65afecdbc5 | |
parent | 0f39465dc52c56bc5c554a563f89d2f632ca54f0 (diff) |
[libview] Fix a crash with document that contain no pages or empty pages
Fixes bgo#605029.
-rw-r--r-- | libview/ev-view.c | 6 |
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; |