commit 57ddd08d56206b714aa2981513d8553399ffd039
Author: Hib Eris <hib@hiberis.nl>
Date:   Sun Mar 1 17:36:51 2009 +0100

    Fix bug for documents with zero pages.
    
    	* ev-page-action-widget.c: check page is in range before
    	  changing to it.

diff --git a/shell/ev-page-action-widget.c b/shell/ev-page-action-widget.c
index 32df345..2b48ab7 100644
--- a/shell/ev-page-action-widget.c
+++ b/shell/ev-page-action-widget.c
@@ -77,6 +77,9 @@ ev_page_action_change_page (EvPageActionWidget *action_widget, gint page)
 	if (page_cache != NULL && page >= 0) {
 		gchar *page_label;
 
+	        if (page < 0 || page > ev_page_cache_get_n_pages (page_cache) -1)
+			return;
+
 		gtk_entry_set_width_chars (GTK_ENTRY (action_widget->entry), 
 					   CLAMP (ev_page_cache_get_max_label_chars (page_cache), 
 					   6, 12));	
