From: Holger Schemel Date: Sun, 13 Dec 2020 19:46:08 +0000 (+0100) Subject: moved initializing hash X-Git-Tag: 4.2.1.0~60 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=011066bbb1e1782eefd41b85d8fd3823484a4c70 moved initializing hash --- diff --git a/src/files.c b/src/files.c index 0b656358..1b3016a3 100644 --- a/src/files.c +++ b/src/files.c @@ -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);