Commit 0320d8e6 authored by Thomas Roessler's avatar Thomas Roessler

Avoid duplicate mx_close_mailbox() when OP_QUIT is called.

parent 27f760bf
......@@ -965,7 +965,11 @@ int mutt_index_menu (void)
if ((menu->menu == MENU_MAIN)
&& (query_quadoption (OPT_QUIT,
_("Exit Mutt without saving?")) == M_YES))
{
mx_fastclose_mailbox (Context);
safe_free ((void **) &Context);
done = 1;
}
break;
case OP_MAIN_NEXT_UNDELETED:
......
......@@ -672,17 +672,9 @@ int main (int argc, char **argv)
if ((Context = mx_open_mailbox (folder, ((flags & M_RO) || option (OPTREADONLY)) ? M_READONLY : 0, NULL)) != NULL)
{
int close = mutt_index_menu ();
mutt_index_menu ();
if (Context)
{
if (close == OP_QUIT)
mx_close_mailbox (Context);
else
mx_fastclose_mailbox (Context);
}
safe_free ((void **)&Context);
safe_free ((void **)&Context);
mutt_endwin (NULL);
}
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment