moved initializing hash
authorHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 19:46:08 +0000 (20:46 +0100)
committerHolger Schemel <info@artsoft.org>
Sun, 13 Dec 2020 19:46:08 +0000 (20:46 +0100)
src/files.c

index 0b656358d61eefb548c149e8d27c604816fa6638..1b3016a324874a410715d1b53c30f2de8601901b 100644 (file)
@@ -9477,6 +9477,9 @@ void setHideSetupEntry(void *setup_value)
 {
   char *hide_setup_token = getHideSetupToken(setup_value);
 
+  if (hide_setup_hash == NULL)
+    hide_setup_hash = newSetupFileHash();
+
   if (setup_value != NULL)
     setHashEntry(hide_setup_hash, hide_setup_token, "");
 }
@@ -9519,9 +9522,6 @@ static void decodeSetupFileHash(SetupFileHash *setup_file_hash)
   if (!setup_file_hash)
     return;
 
-  if (hide_setup_hash == NULL)
-    hide_setup_hash = newSetupFileHash();
-
   for (i = 0; i < ARRAY_SIZE(global_setup_tokens); i++)
     setSetupInfoFromTokenInfo(setup_file_hash, global_setup_tokens, i);