diff options
author | Rob Bradford <rob@linux.intel.com> | 2010-08-02 22:09:27 +0800 |
---|---|---|
committer | Rob Bradford <rob@linux.intel.com> | 2010-08-02 22:36:50 +0800 |
commit | 3696034171889e067b7c9b9e118b9746c1986bcf (patch) | |
tree | c9efbfd639d9c8f7ab20963e60569b83f329c402 | |
parent | 2b6e5cce1912d6d7bb7f69b7cae29ccb0c8a7161 (diff) | |
download | gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar.gz gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar.bz2 gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar.lz gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar.xz gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.tar.zst gsoc2013-evolution-3696034171889e067b7c9b9e118b9746c1986bcf.zip |
mail-reader: e_mail_reader_get_formatter may now return NULL
Since e_mail_reader_get_formatter (the EMailNotebookView implementation) can
now return NULL we need to prevent that being passed into other functions.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=624867
-rw-r--r-- | mail/e-mail-reader.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mail/e-mail-reader.c b/mail/e-mail-reader.c index ff6245eb69..3d4378b6bf 100644 --- a/mail/e-mail-reader.c +++ b/mail/e-mail-reader.c @@ -1184,6 +1184,9 @@ action_mail_show_all_headers_cb (GtkToggleAction *action, formatter = e_mail_reader_get_formatter (reader); + if (!formatter) + return; + if (gtk_toggle_action_get_active (action)) mode = EM_FORMAT_ALLHEADERS; else @@ -1213,7 +1216,10 @@ action_mail_show_source_cb (GtkAction *action, browser = e_mail_browser_new (shell_backend); reader = E_MAIL_READER (browser); formatter = e_mail_reader_get_formatter (reader); - em_format_set_mode (EM_FORMAT (formatter), EM_FORMAT_SOURCE); + + if (formatter) + em_format_set_mode (EM_FORMAT (formatter), EM_FORMAT_SOURCE); + e_mail_reader_set_folder (reader, folder, folder_uri); e_mail_reader_set_message (reader, uids->pdata[0]); gtk_widget_show (browser); |