]> granicus.if.org Git - neomutt/commitdiff
Fix nullptr dereference
authorPietro Cerutti <gahr@gahr.ch>
Tue, 30 Apr 2019 11:41:02 +0000 (11:41 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 30 Apr 2019 11:55:39 +0000 (12:55 +0100)
Fixes #1659

browser.c

index eb14ed7a1e4dd8d26dc59fda13da42fc489a6551..fea0c96cb25d22c1ab36aa636d8fa9268bc1bad7 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -741,7 +741,8 @@ static int examine_directory(struct Menu *menu, struct BrowserState *state,
       goto ed_out;
     }
 
-    mutt_mailbox_check(Context->mailbox, 0);
+    if (Context && Context->mailbox)
+      mutt_mailbox_check(Context->mailbox, 0);
 
     dp = opendir(d);
     if (!dp)