diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-08-16 18:31:11 -0700 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-08-16 18:31:11 -0700 |
commit | eda54c6bb6b15939c2cc26f451166cccd9a138eb (patch) | |
tree | 2e0924243b0e51f4f3fc0e43bc14c4cdeb5955af | |
parent | 6c0f75cca9f962524e9a7c1482ab342acf1ce5c1 (diff) |
Improve attach files handling of empty value.
Hitting enter at the attach files prompt will still allocate an entry
in the attachment array. It might make sense to "abort" inside the
prompt for that case, but it's a change of behavior to have the prompt
do so.
Instead, have the compose menu prompt skip NULL values.
-rw-r--r-- | compose.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1261,6 +1261,8 @@ int mutt_compose_menu (SEND_CONTEXT *sctx) for (i = 0; i < numfiles; i++) { char *att = files[i]; + if (!att) + continue; new = (ATTACHPTR *) safe_calloc (1, sizeof (ATTACHPTR)); new->unowned = 1; new->content = mutt_make_file_attach (att); |