mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-14 20:54:16 +01:00
Merge pull request #661 from daemitus/corehookCatch
This commit is contained in:
commit
7a54c0006a
1 changed files with 11 additions and 1 deletions
|
|
@ -5,6 +5,7 @@ using Dalamud.Configuration.Internal;
|
||||||
using Dalamud.Hooking.Internal;
|
using Dalamud.Hooking.Internal;
|
||||||
using Dalamud.Memory;
|
using Dalamud.Memory;
|
||||||
using Reloaded.Hooks;
|
using Reloaded.Hooks;
|
||||||
|
using Serilog;
|
||||||
|
|
||||||
namespace Dalamud.Hooking
|
namespace Dalamud.Hooking
|
||||||
{
|
{
|
||||||
|
|
@ -54,7 +55,16 @@ namespace Dalamud.Hooking
|
||||||
this.address = address;
|
this.address = address;
|
||||||
if (this.isCoreHook)
|
if (this.isCoreHook)
|
||||||
{
|
{
|
||||||
this.coreHookImpl = CoreHook.HookFactory.CreateHook<T>(address, detour);
|
try
|
||||||
|
{
|
||||||
|
this.coreHookImpl = CoreHook.HookFactory.CreateHook<T>(address, detour);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
this.isCoreHook = false;
|
||||||
|
Log.Error(ex, "CoreHook is having a bad day, defaulting to Reloaded");
|
||||||
|
this.hookImpl = ReloadedHooks.Instance.CreateHook<T>(detour, address.ToInt64());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue