From: Rocco Rutte Date: Fri, 7 Dec 2007 09:57:28 +0000 (+0100) Subject: Don't attempt to move messages when $mbox is unset. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b38c85752f1d8d59d192632d53357d86e6f77df6;p=neomutt Don't attempt to move messages when $mbox is unset. --- diff --git a/mx.c b/mx.c index 08ac4b260..9ad033262 100644 --- a/mx.c +++ b/mx.c @@ -855,10 +855,10 @@ int mx_close_mailbox (CONTEXT *ctx, int *index_hint) strfcpy (mbox, NONULL(Inbox), sizeof (mbox)); isSpool = mutt_is_spool (ctx->path) && !mutt_is_spool (mbox); } - mutt_expand_path (mbox, sizeof (mbox)); - if (isSpool) + if (isSpool && mbox && *mbox) { + mutt_expand_path (mbox, sizeof (mbox)); snprintf (buf, sizeof (buf), _("Move read messages to %s?"), mbox); if ((move_messages = query_quadoption (OPT_MOVE, buf)) == -1) {