]> granicus.if.org Git - mutt/commitdiff
[stable] When sending a message in batch mode failed, mutt would
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 4 Jan 1999 12:52:19 +0000 (12:52 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 4 Jan 1999 12:52:19 +0000 (12:52 +0000)
dump core.  Patch from Byrial Jensen.

send.c

diff --git a/send.c b/send.c
index ca3fb1768335e6aac06cb676bd1d26872f7e99de..a27654ca36ecaa9e548a73db886d2c8c80de54fc 100644 (file)
--- a/send.c
+++ b/send.c
@@ -1314,8 +1314,16 @@ full_fcc:
 
   if (send_message (msg) == -1)
   {
-    msg->content = mutt_remove_multipart (msg->content);
-    goto main_loop;
+    if (!(flags & SENDBATCH))
+    {
+      msg->content = mutt_remove_multipart (msg->content);
+      goto main_loop;
+    }
+    else
+    {
+      puts _("Could not send the message.");
+      goto cleanup;
+    }
   }
 
   if (!option (OPTNOCURSES) && ! (flags & SENDMAILX))