aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/mail/e-mail-shell-content.c6
1 files changed, 5 insertions, 1 deletions
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;