diff --git a/Source/Engine/Content/Assets/VisualScript.cpp b/Source/Engine/Content/Assets/VisualScript.cpp index ebacae017..2bfa4ed12 100644 --- a/Source/Engine/Content/Assets/VisualScript.cpp +++ b/Source/Engine/Content/Assets/VisualScript.cpp @@ -624,7 +624,9 @@ void VisualScriptExecutor::ProcessGroupFunction(Box* boxBase, Node* node, Value& { // Evaluate method parameter value from the current scope auto& scope = ThreadStacks.Get().Stack->Scope; - value = scope->Parameters[boxBase->ID - 1]; + int32 index = boxBase->ID - 1; + if (index < scope->Parameters.Length()) + value = scope->Parameters.Get()[index]; } break; }