]> granicus.if.org Git - mutt/commitdiff
Avoid a segfault attempting to browse an invalid IMAP URL.
authorBrendan Cully <brendan@kublai.com>
Sun, 7 Aug 2005 22:16:25 +0000 (22:16 +0000)
committerBrendan Cully <brendan@kublai.com>
Sun, 7 Aug 2005 22:16:25 +0000 (22:16 +0000)
browser.c

index e654baa8344b4fe2185969ccaa6bd62cc03b6caa..2f29dd241f4daa98933555b3a42fe4a6947ae877 100644 (file)
--- 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
     {