From: Carlos Garcia Campos Date: Sun, 20 Dec 2009 16:38:46 +0000 (+0100) Subject: [libview] Fix a crash with document that contain no pages or empty pages X-Git-Tag: EVINCE_2_29_4~4 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=bf8fe0d26b7319b9ad3a8a79fbf618343f603c62;p=evince.git [libview] Fix a crash with document that contain no pages or empty pages Fixes bgo#605029. --- diff --git a/libview/ev-view.c b/libview/ev-view.c index 735ad134..7a3a6dc2 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;