X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=uip%2Fnew.c;h=254950b258da90405dad5a85a04d2f23589952b0;hb=9530ace10a49d62c80c95914601fa9246099501b;hp=82d6db558f6116a40453b167b64334bcc4a31070;hpb=2f689a1cb907a5de04e6d39ffd217a69af3216c7;p=mmh diff --git a/uip/new.c b/uip/new.c index 82d6db5..254950b 100644 --- a/uip/new.c +++ b/uip/new.c @@ -4,8 +4,6 @@ * -- as fnext, move to next folder with unseen messages * -- as fprev, move to previous folder with unseen messages * -- as unseen, scan all unseen messages - * $Id$ - * * This code is Copyright (c) 2008, by the authors of nmh. See the * COPYRIGHT file in the root directory of the nmh distribution for * complete copyright information. @@ -310,7 +308,10 @@ doit(char *cur, char *folders, char *sequences[]) folders, sequences); if (run_mode == FNEXT || run_mode == FPREV) { - if (first->n_next == NULL) { + if (first == NULL) { + /* No folders at all... */ + return NULL; + } else if (first->n_next == NULL) { /* We have only one node; any desired messages in it? */ if (first->n_field == NULL) { return NULL;