aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index c7fcbeec50..7c0086e8ab 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -611,7 +611,7 @@ reply (FolderBrowser *fb, gboolean to_all)
EMsgComposer *composer;
struct post_send_data *psd;
- if (!check_configured ())
+ if (!check_configured () || !fb->message_list->cursor_uid)
return;
psd = g_new (struct post_send_data, 1);
@@ -677,22 +677,19 @@ attach_msg (MessageList *ml, const char *uid, gpointer data)
void
forward_msg (GtkWidget *button, gpointer user_data)
{
- FolderBrowser *fb;
+ FolderBrowser *fb = FOLDER_BROWSER (user_data);
EMsgComposer *composer;
CamelMimeMessage *cursor_msg;
const char *from, *subject;
char *fwd_subj;
- if (!check_configured ())
+ cursor_msg = fb->mail_display->current_message;
+ if (!check_configured () || !cursor_msg)
return;
-
- fb = FOLDER_BROWSER (user_data);
composer = E_MSG_COMPOSER (e_msg_composer_new ());
message_list_foreach (fb->message_list, attach_msg, composer);
- cursor_msg = fb->mail_display->current_message;
-
from = camel_mime_message_get_from (cursor_msg);
subject = camel_mime_message_get_subject (cursor_msg);
if (from) {