aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-display.c
diff options
context:
space:
mode:
authorDan Vrátil <dvratil@redhat.com>2012-04-27 23:58:00 +0800
committerDan Vrátil <dvratil@redhat.com>2012-04-27 23:58:35 +0800
commit8ffb4930b26f9badf8eb0cdb93275c01d3d36f6a (patch)
tree3f8bb52245f14490d7928ec7e0d3ad204d7ac460 /mail/e-mail-display.c
parenta593d514c872dace24e899c1ccb25955f985cbc4 (diff)
downloadgsoc2013-evolution-8ffb4930b26f9badf8eb0cdb93275c01d3d36f6a.tar.gz
gsoc2013-evolution-8ffb4930b26f9badf8eb0cdb93275c01d3d36f6a.tar.zst
gsoc2013-evolution-8ffb4930b26f9badf8eb0cdb93275c01d3d36f6a.zip
Bug #674060 - Preview panel on folder change not updated
Diffstat (limited to 'mail/e-mail-display.c')
-rw-r--r--mail/e-mail-display.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 1ffeb82c1b..96c7d97c78 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -1401,9 +1401,11 @@ e_mail_display_set_formatter (EMailDisplay *display,
EMFormatHTML *formatter)
{
g_return_if_fail (E_IS_MAIL_DISPLAY (display));
- g_return_if_fail (EM_IS_FORMAT_HTML (formatter));
- g_object_ref (formatter);
+ if (formatter) {
+ g_return_if_fail (EM_IS_FORMAT_HTML (formatter));
+ g_object_ref (formatter);
+ }
if (display->priv->formatter != NULL) {
/* The formatter might still exist after unrefing it, so
@@ -1415,6 +1417,11 @@ e_mail_display_set_formatter (EMailDisplay *display,
display->priv->formatter = formatter;
+ if (!formatter) {
+ e_web_view_clear (E_WEB_VIEW (display));
+ return;
+ }
+
mail_display_update_formatter_colors (display);
g_signal_connect (formatter, "notify::image-loading-policy",