X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fmisc.c;h=aaad307ae05c1bdb65404f9f02062962bcae3d48;hb=cec9eb9aaa3619d50b565219445dd1fdd4d9bd39;hp=2389f59a8c8bdd2bb69f71fd4412a002fff3e12d;hpb=bb2ddcf13df18d69e4472d4697da173981970e9d;p=rocksndiamonds.git diff --git a/src/misc.c b/src/misc.c index 2389f59a..aaad307a 100644 --- a/src/misc.c +++ b/src/misc.c @@ -1182,8 +1182,13 @@ boolean validLevelSeries(struct LevelDirInfo *node) struct LevelDirInfo *getFirstValidLevelSeries(struct LevelDirInfo *node) { - if (node == NULL) /* start with first level directory entry */ - return getFirstValidLevelSeries(leveldir_first); + if (node == NULL) + { + if (leveldir_first) /* start with first level directory entry */ + return getFirstValidLevelSeries(leveldir_first); + else + return NULL; + } else if (node->node_group) /* enter level group (step down into tree) */ return getFirstValidLevelSeries(node->node_group); else if (node->parent_link) /* skip start entry of level group */