fixed horrible crash bug caused by dereferencing pointer just freed before
authorHolger Schemel <info@artsoft.org>
Thu, 25 Feb 2021 11:31:05 +0000 (12:31 +0100)
committerHolger Schemel <info@artsoft.org>
Thu, 25 Feb 2021 11:31:05 +0000 (12:31 +0100)
src/libgame/setup.c

index 315c615f28b41395bb9e89b779f0b0ef587832d4..d88af07c89bcd0945d2a5c3f489660c553dba7d5 100644 (file)
@@ -4547,6 +4547,8 @@ void UpdateLastPlayedLevels_TreeInfo(void)
 
   freeTreeInfo(*node_new);
 
+  *node_new = NULL;
+
   for (i = 0; last_level_series[i] != NULL; i++)
   {
     LevelDirTree *node_last = getTreeInfoFromIdentifier(leveldir_first,