diff --git a/Dalamud/Hooking/Hook.cs b/Dalamud/Hooking/Hook.cs index 25471a23f..7171e2ec7 100644 --- a/Dalamud/Hooking/Hook.cs +++ b/Dalamud/Hooking/Hook.cs @@ -5,6 +5,7 @@ using Dalamud.Configuration.Internal; using Dalamud.Hooking.Internal; using Dalamud.Memory; using Reloaded.Hooks; +using Serilog; namespace Dalamud.Hooking { @@ -54,7 +55,16 @@ namespace Dalamud.Hooking this.address = address; if (this.isCoreHook) { - this.coreHookImpl = CoreHook.HookFactory.CreateHook(address, detour); + try + { + this.coreHookImpl = CoreHook.HookFactory.CreateHook(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(detour, address.ToInt64()); + } } else {