aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-06-03 03:32:20 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-06-03 03:32:20 +0800
commit46905edb53ecdc18f59c701cb5be3fd3829e9198 (patch)
tree51a1e4a0df951c8c53dbe14b27aa691a2659b538
parentabf31aee9f84cc700f9947425bf575165d96c77b (diff)
downloadgsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar.gz
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar.bz2
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar.lz
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar.xz
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.tar.zst
gsoc2013-evolution-46905edb53ecdc18f59c701cb5be3fd3829e9198.zip
Fix crash when printing an email.
-rw-r--r--mail/em-format-html-display.c8
1 files changed, 8 insertions, 0 deletions
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),