aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-12 03:59:25 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-12-12 03:59:25 +0000
commit087fa7f20b75990b3a6d4ecf065845bf1d25c509 (patch)
tree075155b085f9cd21760dad058a832b7b008f2b00 /src
parent6477bdeb1afca5492f3ec3bff331ed3837f52e82 (diff)
fixed crash on the request of a page which is out of range.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1414 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/printing.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/printing.c b/src/printing.c
index 70cc776d..0aa0c01d 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -315,6 +315,9 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
gchar buf[BUFFSIZE];
gint count = 0;
+ if (page_nr >= print_data->n_pages)
+ return;
+
pinfo = g_ptr_array_index(print_data->pages, page_nr);
mpinfo = pinfo->mpinfo;
msginfo = mpinfo->msginfo;