diff options
-rw-r--r-- | libview/ev-view.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c index 9125e361..14a9fae0 100644 --- a/libview/ev-view.c +++ b/libview/ev-view.c @@ -754,7 +754,7 @@ view_update_range_and_current_page (EvView *view) if (view->pending_scroll == SCROLL_TO_KEEP_POSITION) { best_current_page = MAX (best_current_page, view->start_page); - if (view->current_page != best_current_page) { + if (best_current_page >= 0 && view->current_page != best_current_page) { view->current_page = best_current_page; hide_loading_window (view); ev_document_model_set_page (view->model, best_current_page); @@ -6332,6 +6332,7 @@ jump_to_find_page (EvView *view, EvViewFindDirection direction, gint shift) void ev_view_find_changed (EvView *view, GList **results, gint page) { + g_return_if_fail (view->current_page >= 0); view->find_pages = results; if (view->jump_to_find_result == TRUE) { |