char *pgpkeylist = NULL;
char *encrypt_as = NULL;
int is_signed;
+ struct Body *clear_content = NULL;
- if (!Postponed)
+ if (!(Postponed && *Postponed))
+ {
+ mutt_error(_("Can not postpone. $postponed is unset"));
return -1;
+ }
if (msg->content->next)
msg->content = mutt_make_multipart(msg->content);
msg->security &= ~SIGN;
pgpkeylist = mutt_str_strdup(encrypt_as);
+ clear_content = msg->content;
if (mutt_protect(msg, pgpkeylist) == -1)
{
if (is_signed)
(cur && (flags & SEND_REPLY)) ? cur->env->message_id : NULL,
true, fcc, NULL) < 0)
{
+ if (clear_content)
+ {
+ mutt_body_free(&msg->content);
+ msg->content = clear_content;
+ }
msg->content = mutt_remove_multipart(msg->content);
decode_descriptions(msg->content);
mutt_unprepare_envelope(msg->env);
return -1;
}
+
mutt_update_num_postponed();
+ if (clear_content)
+ mutt_body_free(&clear_content);
+
return 0;
}