Skip to content

Commit e8f41a6

Browse files
author
Dmytro Ivanov
authored
FIX: Closing profiler marker properly (#1631)
1 parent 8d6d568 commit e8f41a6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Packages/com.unity.inputsystem/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ however, it has to be formatted properly to pass verification tests.
1010

1111
## [Unreleased]
1212

13+
### Fixed
14+
15+
- Fixed unclosed profiler marker in `InvokeCallbacksSafe_AnyCallbackReturnsTrue` which would lead to eventually broken profiler traces in some cases like using `PlayerInput` (case ISXB-393).
16+
1317
## [1.5.0] - 2023-01-24
1418

1519
### Added

Packages/com.unity.inputsystem/InputSystem/Utilities/DelegateHelpers.cs

+4
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,11 @@ public static bool InvokeCallbacksSafe_AnyCallbackReturnsTrue<TValue1, TValue2>(
9595
try
9696
{
9797
if (callbacks[i](argument1, argument2))
98+
{
99+
callbacks.UnlockForChanges();
100+
Profiler.EndSample();
98101
return true;
102+
}
99103
}
100104
catch (Exception exception)
101105
{

0 commit comments

Comments
 (0)