diff options
author | Carlos Garcia Campos <carlosgc@gnome.org> | 2008-11-23 16:56:39 (GMT) |
---|---|---|
committer | Carlos Garcia Campos <carlosgc@src.gnome.org> | 2008-11-23 16:56:39 (GMT) |
commit | 15940d1d8b71c9c3c73ea2bad5800ee09819e541 (patch) | |
tree | 221a26682111ee49d543893fc6902768e01dc28f /shell | |
parent | 522d2b9c2a71f477fdfa21d12dad6d7f3c6ebf6e (diff) |
Make sure find_result is never < 0 which causes a crash while searching.
2008-11-23 Carlos Garcia Campos <carlosgc@gnome.org>
* 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=/trunk/; revision=3273
Diffstat (limited to 'shell')
-rw-r--r-- | shell/ev-view.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell/ev-view.c b/shell/ev-view.c index 9c575d2..02a2783 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -5181,7 +5181,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); |