mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
fix: use -1 as ProcessHandle for ActorTable read hack
This commit is contained in:
parent
e1d82d8c72
commit
162ba3f894
1 changed files with 2 additions and 2 deletions
|
|
@ -43,7 +43,7 @@ namespace Dalamud.Game.ClientState.Actors {
|
||||||
|
|
||||||
private static readonly int ActorMemSize = Marshal.SizeOf(typeof(Structs.Actor));
|
private static readonly int ActorMemSize = Marshal.SizeOf(typeof(Structs.Actor));
|
||||||
private IntPtr actorMem = Marshal.AllocHGlobal(ActorMemSize);
|
private IntPtr actorMem = Marshal.AllocHGlobal(ActorMemSize);
|
||||||
private Process currentProcess = Process.GetCurrentProcess();
|
private IntPtr currentProcessHandle = new IntPtr(-1);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@ namespace Dalamud.Game.ClientState.Actors {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
// FIXME: hack workaround for trying to access the player on logout, after the main object has been deleted
|
// FIXME: hack workaround for trying to access the player on logout, after the main object has been deleted
|
||||||
if (!ReadProcessMemory(this.currentProcess.Handle, offset, this.actorMem, ActorMemSize, out _))
|
if (!ReadProcessMemory(this.currentProcessHandle, offset, this.actorMem, ActorMemSize, out _))
|
||||||
{
|
{
|
||||||
Log.Debug("ActorTable - ReadProcessMemory failed: likely player deletion during logout");
|
Log.Debug("ActorTable - ReadProcessMemory failed: likely player deletion during logout");
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue