From cdcab4599a3d5fc6c2f6b8554e969eef536f0f1a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 9 Dec 2021 12:51:19 +0100 Subject: global-functions: $ScriptLock: initialize earlier --- global-functions | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'global-functions') diff --git a/global-functions b/global-functions index 1dd4642..f5682be 100644 --- a/global-functions +++ b/global-functions @@ -888,6 +888,9 @@ :if ([ :typeof $ScriptLockOrder ] = "nothing") do={ :set ScriptLockOrder [ :toarray "" ]; } + :if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={ + :set ($ScriptLockOrder->$Script) [ :toarray "" ]; + } :local JobCount do={ :local Script [ :tostr $1 ]; @@ -928,10 +931,6 @@ :global ScriptLockOrder; - :if ([ :typeof ($ScriptLockOrder->$Script) ] = "nothing") do={ - :set ($ScriptLockOrder->$Script) [ :toarray "" ]; - } - :while (true) do={ :local Pos [ :len ($ScriptLockOrder->$Script) ]; :set ($ScriptLockOrder->$Script->$Pos) $Add; -- cgit v1.2.3-70-g09d2