From 2a51ab6030f02c394dfa9c90cfa9aeacd9b69858 Mon Sep 17 00:00:00 2001 From: Dusk-92 Date: Sat, 29 Aug 2026 11:46:48 +0200 Subject: [PATCH] V37.1 ExitFix: detach model hooks before D3D9 cleanup --- src/outline/outline.zig | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/outline/outline.zig b/src/outline/outline.zig index c696e3b..1ea0ce3 100644 --- a/src/outline/outline.zig +++ b/src/outline/outline.zig @@ -109,8 +109,11 @@ pub fn initD3D9Deferred() void { /// Remove all outline hooks. Called during DLL_PROCESS_DETACH. pub fn cleanup() void { if (g_is_hook_owner) { - d3d9_hook.removeHooks(); + // ExitFix: stop any future self-heal first, then detach the model hooks + // that can call lateRehookIfLost(), and only then tear down D3D9. + d3d9_hook.beginShutdown(); model_hook.removeHooks(); + d3d9_hook.removeHooks(); log.close(); mod_mutex.release(&g_mutex); }