diff --git a/Packages/com.unity.inputsystem/CHANGELOG.md b/Packages/com.unity.inputsystem/CHANGELOG.md index 88ad57418e..36548dfd48 100644 --- a/Packages/com.unity.inputsystem/CHANGELOG.md +++ b/Packages/com.unity.inputsystem/CHANGELOG.md @@ -10,6 +10,10 @@ however, it has to be formatted properly to pass verification tests. ## [Unreleased] +### Fixed + +- Fixed unclosed profiler marker in `InvokeCallbacksSafe_AnyCallbackReturnsTrue` which would lead to eventually broken profiler traces in some cases like using `PlayerInput` (case ISXB-393). + ## [1.5.0] - 2023-01-24 ### Added diff --git a/Packages/com.unity.inputsystem/InputSystem/Utilities/DelegateHelpers.cs b/Packages/com.unity.inputsystem/InputSystem/Utilities/DelegateHelpers.cs index b0c57d1282..ef4d443360 100644 --- a/Packages/com.unity.inputsystem/InputSystem/Utilities/DelegateHelpers.cs +++ b/Packages/com.unity.inputsystem/InputSystem/Utilities/DelegateHelpers.cs @@ -95,7 +95,11 @@ public static bool InvokeCallbacksSafe_AnyCallbackReturnsTrue( try { if (callbacks[i](argument1, argument2)) + { + callbacks.UnlockForChanges(); + Profiler.EndSample(); return true; + } } catch (Exception exception) {