Skip to content

Commit

Permalink
Include method null change in initial relay check
Browse files Browse the repository at this point in the history
  • Loading branch information
Banane9 committed Dec 23, 2024
1 parent efe5b15 commit d7b607b
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ protected override void Handle(ResolveTooltipLabelEvent eventData)
pressed = eventData.Button.Pressed;
}
else if (eventData.Button.Slot.GetComponent<ButtonRelayBase>() is ButtonRelayBase relay
&& relay.GetSyncMember(nameof(ButtonRelay<dummy>.ButtonPressed)) is ISyncDelegate relayPressed)
&& relay.GetSyncMember(nameof(ButtonRelay<dummy>.ButtonPressed)) is ISyncDelegate relayPressed
&& relayPressed.Method is not null)
{
pressed = relayPressed;

Expand All @@ -47,8 +48,6 @@ protected override void Handle(ResolveTooltipLabelEvent eventData)
return;
}

if (pressed.Method is null) return;

var targetType = pressed.Method.GetMethodInfo().DeclaringType;
var localeKey = $"Tooltip.{targetType.Name}.{pressed.MethodName}";

Expand Down

0 comments on commit d7b607b

Please sign in to comment.