AmendHub

Download:

jcs

/

subtext

/

amendments

/

118

mail: Check for session ending in menu loops


jcs made amendment 118 over 2 years ago
--- mail.c Wed Jun 1 16:44:05 2022 +++ mail.c Fri Jun 3 21:11:58 2022 @@ -144,7 +144,7 @@ mail_menu(struct session *s) page = 0; - while (!done) { + while (!done && !s->ending) { if (find_message_ids) { if (mail_ids != NULL) free(mail_ids); @@ -494,7 +494,7 @@ mail_read(struct session *s, unsigned long id, short i snprintf(prompt, sizeof(prompt), "Mail:Message %d", idx); snprintf(title, sizeof(title), "Private Mail: Message %d", idx); - while (!done) { + while (!done && !s->ending) { c = session_menu(s, title, prompt, opts, nitems(opts), show_help); show_help = false;