File bgo-569892-print-dialog-crash.patch of Package evolution

diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c
index a903820..985828d 100644
--- a/mail/em-format-html-print.c
+++ b/mail/em-format-html-print.c
@@ -71,6 +71,7 @@ efhp_init (GObject *o)
 	gtk_container_add (GTK_CONTAINER (efhp->window), html);
 	gtk_widget_realize (html);
 	efhp->parent.show_icon = FALSE;
+	((EMFormat *)efhp)->print = TRUE;
 }
 
 GType
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index a4fb9dd..8fa6c03 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -1268,7 +1268,7 @@ efh_format_exec (struct _format_msg *m)
 		if (handle)
 			handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
 		handle = em_format_find_handler((EMFormat *)m->format, "x-evolution/message/post-header-closure");
-		if (handle)
+		if (handle && !((EMFormat *)m->format)->print)
 			handle->handler((EMFormat *)m->format, (CamelStream *)m->estream, (CamelMimePart *)m->message, handle);
 
 	}
diff --git a/mail/em-format.c b/mail/em-format.c
index 048cf65..a9ec093 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -120,6 +120,7 @@ emf_init(GObject *o)
 		(GDestroyNotify) NULL,
 		(GDestroyNotify) emf_free_cache);
 	emf->composer = FALSE;
+	emf->print = FALSE;
 	emf->show_photo = TRUE;
 	emf->photo_local = TRUE;
 	e_dlist_init(&emf->header_list);
diff --git a/mail/em-format.h b/mail/em-format.h
index 7d4b00b..1ca0cef 100644
--- a/mail/em-format.h
+++ b/mail/em-format.h
@@ -228,6 +228,7 @@ struct _EMFormat {
 	char *charset;		/* charset override */
 	char *default_charset;	/* charset fallback */
 	gboolean composer; /* Formatting from composer ?*/
+	gboolean print;
 	gboolean show_photo; /* Want to show the photo of the sender ?*/
 	gboolean photo_local; /* Photos only from local addressbooks */
 };
openSUSE Build Service is sponsored by