Skip to content

Commit

Permalink
fix(reg): Fix InteractionTracker regression when it has null Owner
Browse files Browse the repository at this point in the history
  • Loading branch information
Youssef1313 authored May 2, 2024
1 parent 2ea1c54 commit 466c699
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,11 @@ internal void SetPosition(Vector3 newPosition, int requestId)
if (_position != newPosition)
{
_position = newPosition;
if (Owner is { } owner)
NativeDispatcher.Main.Enqueue(() =>
{
NativeDispatcher.Main.Enqueue(() =>
{
owner.ValuesChanged(this, new InteractionTrackerValuesChangedArgs(newPosition, Scale, requestId));
OnPropertyChanged(nameof(Position), isSubPropertyChange: false);
});
}
Owner?.ValuesChanged(this, new InteractionTrackerValuesChangedArgs(newPosition, Scale, requestId));
OnPropertyChanged(nameof(Position), isSubPropertyChange: false);
});
}
}

Expand Down

0 comments on commit 466c699

Please sign in to comment.