diff --git a/MonkeyLoader.Resonite.Integration/UI/Tooltips/ButtonDelegateTooltipResolver.cs b/MonkeyLoader.Resonite.Integration/UI/Tooltips/ButtonDelegateTooltipResolver.cs index 29ad653..d388432 100644 --- a/MonkeyLoader.Resonite.Integration/UI/Tooltips/ButtonDelegateTooltipResolver.cs +++ b/MonkeyLoader.Resonite.Integration/UI/Tooltips/ButtonDelegateTooltipResolver.cs @@ -29,7 +29,8 @@ protected override void Handle(ResolveTooltipLabelEvent eventData) pressed = eventData.Button.Pressed; } else if (eventData.Button.Slot.GetComponent() is ButtonRelayBase relay - && relay.GetSyncMember(nameof(ButtonRelay.ButtonPressed)) is ISyncDelegate relayPressed) + && relay.GetSyncMember(nameof(ButtonRelay.ButtonPressed)) is ISyncDelegate relayPressed + && relayPressed.Method is not null) { pressed = relayPressed; @@ -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}";