[AddonLifecycle] Fixes

This commit is contained in:
MidoriKami 2023-08-29 14:01:53 -07:00
parent efefcd70cf
commit cfef50af0c
2 changed files with 11 additions and 29 deletions

View file

@ -25,11 +25,6 @@ public interface IAddonLifecycle
/// </summary>
public event Action<AddonArgs> AddonPreFinalize;
/// <summary>
/// Event that fires after an addon is done being finalized.
/// </summary>
public event Action<AddonArgs> AddonPostFinalize;
/// <summary>
/// Addon argument data for use in event subscribers.
/// </summary>
@ -40,7 +35,7 @@ public interface IAddonLifecycle
/// <summary>
/// Gets the name of the addon this args referrers to.
/// </summary>
public string AddonName => this.addonName ??= MemoryHelper.ReadString((nint)((AtkUnitBase*)this.Addon)->Name, 0x20);
public string AddonName => this.Addon == nint.Zero ? "NullAddon" : this.addonName ??= MemoryHelper.ReadString((nint)((AtkUnitBase*)this.Addon)->Name, 0x20);
/// <summary>
/// Gets the pointer to the addons AtkUnitBase.