projects
/
mmh
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix crash if fnext/fprev are given an empty folder list
[mmh]
/
uip
/
new.c
diff --git
a/uip/new.c
b/uip/new.c
index
41d2ebf
..
254950b
100644
(file)
--- a/
uip/new.c
+++ b/
uip/new.c
@@
-308,7
+308,10
@@
doit(char *cur, char *folders, char *sequences[])
folders, sequences);
if (run_mode == FNEXT || run_mode == FPREV) {
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;
/* We have only one node; any desired messages in it? */
if (first->n_field == NULL) {
return NULL;