aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/printing.c3
3 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 88c615cf..dfaeb552 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2006-12-12
+ * src/printing.c: draw_page(): fixed crash on the request of a page
+ which is out of range.
+
+2006-12-12
+
* src/printing.c: reimplemented multiple page printing.
Implemented printing of MIME part using GtkPrintOperation.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 3cb4ca3d..77206289 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,10 @@
2006-12-12
+ * src/printing.c: draw_page(): 範囲外のページの要求時のクラッシュを
+ 修正。
+
+2006-12-12
+
* src/printing.c: 複数ページの印刷を実装し直した。
GtkPrintOperation を使用して MIME パートの印刷を実装。
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;