From 70ed8286d0293691e828ec46291fa1b0a549cc63 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Sat, 12 Sep 2009 23:21:30 -0500 Subject: Bug 594017 - Crash on set preview visible --- modules/mail/e-mail-shell-content.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'modules/mail') diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c index 10c714a176..c1e4c13eac 100644 --- a/modules/mail/e-mail-shell-content.c +++ b/modules/mail/e-mail-shell-content.c @@ -838,10 +838,14 @@ e_mail_shell_content_set_preview_visible (EMailShellContent *mail_shell_content, if (preview_visible) { EMailReader *reader; MessageList *message_list; + const gchar *cursor_uid; reader = E_MAIL_READER (mail_shell_content); message_list = e_mail_reader_get_message_list (reader); - e_mail_reader_set_message (reader, message_list->cursor_uid); + cursor_uid = message_list->cursor_uid; + + if (cursor_uid != NULL) + e_mail_reader_set_message (reader, cursor_uid); } mail_shell_content->priv->preview_visible = preview_visible; -- cgit