From 54e9286b57274fcfae4ff271cbe23e5e5ca5d2f9 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Sun, 7 Aug 2005 22:16:25 +0000 Subject: [PATCH] Avoid a segfault attempting to browse an invalid IMAP URL. --- browser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/browser.c b/browser.c index e654baa8..2f29dd24 100644 --- a/browser.c +++ b/browser.c @@ -561,8 +561,8 @@ void _mutt_select_file (char *f, size_t flen, int flags, char ***files, int *num { init_state (&state, NULL); state.imap_browse = 1; - imap_browse (f, &state); - strfcpy (LastDir, state.folder, sizeof (LastDir)); + if (!imap_browse (f, &state)) + strfcpy (LastDir, state.folder, sizeof (LastDir)); } else { -- 2.40.0