Print warning if dispose fails

This commit is contained in:
Raymond 2021-08-27 22:31:18 -04:00
parent 873d0c6305
commit 29f4797b4c

View file

@ -66,7 +66,15 @@ namespace Dalamud.Game.Gui.PartyFinder
public void Dispose()
{
this.receiveListingHook.Dispose();
Marshal.FreeHGlobal(this.memory);
try
{
Marshal.FreeHGlobal(this.memory);
}
catch (BadImageFormatException)
{
Log.Warning("Could not free PartyFinderGui memory.");
}
}
private void HandleReceiveListingDetour(IntPtr managerPtr, IntPtr data)