Skip to content

Commit

Permalink
Fix SkyTexHook leak
Browse files Browse the repository at this point in the history
  • Loading branch information
chirpxiv committed Oct 3, 2023
1 parent 178a964 commit 82be2f5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions Ktisis/Interface/Windows/ActorEdit/EditActor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public unsafe static void Draw() {
}

public unsafe static void AdvancedEdit() {
ImGui.Spacing();
var modelId = (int)Target->ModelId;
if (ImGui.InputInt("Model ID", ref modelId)) {
Target->ModelId = (uint)modelId;
Expand Down
4 changes: 2 additions & 2 deletions Ktisis/Interop/Hooks/ActorHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ internal unsafe static IntPtr ControlGaze(nint a1) {
EditGaze.Apply(actor);
return ControlGazeHook.Original(a1);
}

// Init & Dispose

internal unsafe static void Init() {
internal static void Init() {
var controlGaze = Services.SigScanner.ScanText("40 53 41 54 41 55 48 81 EC ?? ?? ?? ?? 48 8B D9");
ControlGazeHook = Services.Hooking.HookFromAddress<ControlGazeDelegate>(controlGaze, ControlGaze);
ControlGazeHook.Enable();
Expand Down
4 changes: 4 additions & 0 deletions Ktisis/Interop/Hooks/EnvHooks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,12 @@ public unsafe static void Init() {

public static void Dispose() {
DisableHooks();

EnvUpdateHook.Dispose();
EnvUpdateHook.Dispose();

SkyTexHook.Disable();
SkyTexHook.Dispose();
}
}
}
1 change: 0 additions & 1 deletion Ktisis/Ktisis.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<Company>Ktisis Tools</Company>
<Version>0.2.19</Version>
<Description>An internal posing tool.</Description>
<Copyright></Copyright>
<PackageProjectUrl>https://github.com/ktisis-tools/Ktisis</PackageProjectUrl>
<Configurations>Debug;Release;External</Configurations>
</PropertyGroup>
Expand Down

0 comments on commit 82be2f5

Please sign in to comment.