]> granicus.if.org Git - neomutt/commitdiff
bug: check pointer
authorRichard Russon <rich@flatcap.org>
Thu, 16 Aug 2018 11:31:40 +0000 (12:31 +0100)
committerRichard Russon <rich@flatcap.org>
Thu, 16 Aug 2018 11:31:40 +0000 (12:31 +0100)
browser.c

index 6d39df2357f45085484eefb01f14dcd391d94714..440cfcd26c0fb933d9c4903ae54c4f9556bc15fb 100644 (file)
--- a/browser.c
+++ b/browser.c
@@ -877,7 +877,7 @@ static int examine_directory(struct Menu *menu, struct BrowserState *state,
         np->b->msg_count = Context->msgcount;
         np->b->msg_unread = Context->unread;
       }
-      add_folder(menu, state, de->d_name, NULL, &s, np->b, NULL);
+      add_folder(menu, state, de->d_name, NULL, &s, np ? np->b : NULL, NULL);
     }
     closedir(dp);
   }