fix: catch exceptions in hook

This commit is contained in:
Anna 2021-04-16 08:19:35 -04:00
parent c7be246813
commit 7ce47da30f
1 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,7 @@
using System.Numerics;
using System.Runtime.InteropServices;
using Dalamud.Hooking;
using Dalamud.Plugin;
namespace Tourist {
public class GameFunctions : IDisposable {
@ -46,7 +47,11 @@ namespace Tourist {
}
private IntPtr OnVistaUnlock(ushort index, int a2, int a3) {
this.Plugin.Markers.RemoveVfx(index);
try {
this.Plugin.Markers.RemoveVfx(index);
} catch (Exception ex) {
PluginLog.LogError(ex, "Exception in vista unlock");
}
return this.VistaUnlockedHook.Original(index, a2, a3);
}