diff --git a/Dalamud/ImGuiScene/Helpers/ReShadePeeler.cs b/Dalamud/ImGuiScene/Helpers/ReShadePeeler.cs index 86bc88d9ee..bb3f4540f2 100644 --- a/Dalamud/ImGuiScene/Helpers/ReShadePeeler.cs +++ b/Dalamud/ImGuiScene/Helpers/ReShadePeeler.cs @@ -115,12 +115,12 @@ private static bool BelongsInReShadeDll(nint ptr) private static bool IsReShadedComObject(T* obj) where T : unmanaged, IUnknown.Interface { - var vtbl = (nint*)((IUnknown*)obj)->lpVtbl; try { + var vtbl = (nint**)Marshal.ReadIntPtr((nint)obj); for (var i = 0; i < 3; i++) { - if (!BelongsInReShadeDll(Marshal.ReadIntPtr((nint)(&vtbl[i])))) + if (!BelongsInReShadeDll(Marshal.ReadIntPtr((nint)(vtbl + i)))) return false; }