2007-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
	* backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_begin):
	* shell/ev-print-job.c: (ev_print_job_class_init):
	Fix a crash when printing with the gnome-print dialog. Fixes bug
	#488939.
svn path=/trunk/; revision=2713
+2007-10-22  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * backend/pdf/ev-poppler.cc: (pdf_document_file_exporter_begin):
+       * shell/ev-print-job.c: (ev_print_job_class_init):
+
+       Fix a crash when printing with the gnome-print dialog. Fixes bug
+       #488939.
+       
 2007-10-18  Sebastien Bacher  <seb128@ubuntu.com>
 
        * backend/pixbuf/pixbuf-document.c:
 
        pdf_document->print_ctx = g_new0 (PdfPrintContext, 1);
        ctx = pdf_document->print_ctx;
        ctx->format = fc->format;
-       ctx->pages_per_sheet = fc->pages_per_sheet;
+       ctx->pages_per_sheet = CLAMP (fc->pages_per_sheet, 1, 16);
 
        ctx->paper_width = fc->paper_width;
        ctx->paper_height = fc->paper_height;
 
 static void
 ev_print_job_init (EvPrintJob *ev_print_job)
 {
+       ev_print_job->fc.pages_per_sheet = 1;
 }
 
 void