From 46905edb53ecdc18f59c701cb5be3fd3829e9198 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Tue, 2 Jun 2009 15:32:20 -0400 Subject: Fix crash when printing an email. --- mail/em-format-html-display.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 2a51bfad6c..e4aa4e06ab 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -1293,6 +1293,10 @@ efhd_add_bar (EMFormatHTML *efh, EMFormatHTMLDisplayPrivate *priv; GtkWidget *widget; + /* XXX See note in efhd_message_add_bar(). */ + if (!EM_IS_FORMAT_HTML_DISPLAY (efh)) + return FALSE; + priv = EM_FORMAT_HTML_DISPLAY_GET_PRIVATE (efh); widget = e_mail_attachment_bar_new (); @@ -1315,6 +1319,10 @@ efhd_message_add_bar (EMFormat *emf, { const gchar *classid = "attachment-bar"; + /* XXX Apparently this installs the callback for -all- + * EMFormatHTML subclasses, not just this subclass. + * Bad idea. So we have to filter out other types + * in the callback. */ em_format_html_add_pobject ( EM_FORMAT_HTML (emf), sizeof (EMFormatHTMLPObject), -- cgit v1.2.3