evince r3274 - in branches/gnome-2-24: . shell



Author: carlosgc
Date: Sun Nov 23 16:58:21 2008
New Revision: 3274
URL: http://svn.gnome.org/viewvc/evince?rev=3274&view=rev

Log:
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.



Modified:
   branches/gnome-2-24/ChangeLog
   branches/gnome-2-24/shell/ev-view.c

Modified: branches/gnome-2-24/shell/ev-view.c
==============================================================================
--- branches/gnome-2-24/shell/ev-view.c	(original)
+++ branches/gnome-2-24/shell/ev-view.c	Sun Nov 23 16:58:21 2008
@@ -5217,7 +5217,7 @@
 
 	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);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]