From 02a9c64a78332c024dfb97ecf6774e0d6458a2bc Mon Sep 17 00:00:00 2001 From: goat Date: Thu, 6 Feb 2020 22:23:28 +0900 Subject: [PATCH] fix: handle interface hooking errors --- Dalamud/Dalamud.cs | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/Dalamud/Dalamud.cs b/Dalamud/Dalamud.cs index a93d42c00..acc599411 100644 --- a/Dalamud/Dalamud.cs +++ b/Dalamud/Dalamud.cs @@ -91,12 +91,21 @@ namespace Dalamud { this.WinSock2 = new WinSockHandlers(); - this.InterfaceManager = new InterfaceManager(this, this.SigScanner); - this.InterfaceManager.OnDraw += BuildDalamudUi; - this.InterfaceManager.Enable(); + try { + this.InterfaceManager = new InterfaceManager(this, this.SigScanner); + this.InterfaceManager.OnDraw += BuildDalamudUi; + } catch (Exception e) { + Log.Information(e, "Could not init interface."); + } } public void Start() { + try { + this.InterfaceManager?.Enable(); + } catch (Exception e) { + Log.Information("Could not enable interface."); + } + Framework.Enable(); this.BotManager.Start();