[poppler] glib/demo

Carlos Garcia Campos carlosgc at kemper.freedesktop.org
Mon Mar 31 03:39:07 PDT 2008


 glib/demo/utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be765f27cc5430d9bb2a3e113eb245d67c20a376
Author: Carlos Garcia Campos <carlosgc at gnome.org>
Date:   Mon Mar 31 12:37:33 2008 +0200

    [glib] Fix a crash in outline demo due to page_num == dest_page_num - 1

diff --git a/glib/demo/utils.c b/glib/demo/utils.c
index 989e715..0fa5074 100644
--- a/glib/demo/utils.c
+++ b/glib/demo/utils.c
@@ -101,7 +101,7 @@ pgd_action_view_add_destination (GtkWidget   *action_view,
 			PopplerPage *poppler_page;
 			gchar       *page_label;
 			
-			poppler_page = poppler_document_get_page (document, dest->page_num);
+			poppler_page = poppler_document_get_page (document, MAX (0, dest->page_num - 1));
 			
 			g_object_get (G_OBJECT (poppler_page),
 				      "label", &page_label,


More information about the poppler mailing list