From c187f1e83848ff23aa9b0797853bd008b47f6e8a Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Sun, 23 Nov 2008 16:58:21 +0000 Subject: [PATCH] Make sure find_result is never < 0 which causes a crash while searching. 2008-11-23 Carlos Garcia Campos * shell/ev-view.c: (ev_view_find_previous): Make sure find_result is never < 0 which causes a crash while searching. Fixes bug #558377. svn path=/branches/gnome-2-24/; revision=3274 --- ChangeLog | 7 +++++++ shell/ev-view.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 59f4b3a4..63f075be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-11-23 Carlos Garcia Campos + + * shell/ev-view.c: (ev_view_find_previous): + + Make sure find_result is never < 0 which causes a crash while + searching. Fixes bug #558377. + 2008-11-05 Nickolay V. Shmyrev * cut-n-paste/zoom-control/ephy-zoom-action.c (create_menu_item): diff --git a/shell/ev-view.c b/shell/ev-view.c index 1659302e..2ab0f885 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -5217,7 +5217,7 @@ ev_view_find_previous (EvView *view) if (view->find_result < 0) { jump_to_find_page (view, EV_VIEW_FIND_PREV, -1); - view->find_result = ev_view_find_get_n_results (view, view->current_page) - 1; + view->find_result = MAX (0, ev_view_find_get_n_results (view, view->current_page) - 1); jump_to_find_result (view); } else { jump_to_find_result (view); -- 2.47.1