added safety check (should never happen style)
authorHolger Schemel <info@artsoft.org>
Thu, 25 Feb 2021 11:43:49 +0000 (12:43 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 25 Feb 2021 11:43:49 +0000 (12:43 +0100)
src/libgame/setup.c

index d88af07c89bcd0945d2a5c3f489660c553dba7d5..d867ebbae239e3245939f2a063261ae83fc97b33 100644 (file)
@@ -4553,6 +4553,8 @@ void UpdateLastPlayedLevels_TreeInfo(void)
   {
     LevelDirTree *node_last = getTreeInfoFromIdentifier(leveldir_first,
                                                        last_level_series[i]);
+    if (node_last == NULL)
+      continue;
 
     *node_new = getTreeInfoCopy(node_last);    // copy complete node