mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-01 05:13:40 +01:00
fix: crash on game closing, thanks Dragon!
This commit is contained in:
parent
0fadeb9a05
commit
24525d3d47
1 changed files with 6 additions and 1 deletions
|
|
@ -164,11 +164,16 @@ namespace Dalamud.Game.Internal {
|
|||
|
||||
private IntPtr HandleFrameworkDestroy() {
|
||||
Log.Information("Framework::OnDestroy!");
|
||||
|
||||
// Store the pointer to the original trampoline location
|
||||
var originalPtr = Marshal.GetFunctionPointerForDelegate(this.destroyHook.Original);
|
||||
|
||||
this.dalamud.Unload();
|
||||
|
||||
this.dalamud.WaitForUnloadFinish();
|
||||
|
||||
return this.destroyHook.Original();
|
||||
// Return the original trampoline location to cleanly exit
|
||||
return originalPtr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue