Added null checks before hooking

This commit is contained in:
cdozdil
2026-07-31 21:46:15 +03:00
parent 0d67ec4feb
commit 5ce9b6fb94
+5 -2
View File
@@ -67,8 +67,11 @@ static void HookDevice(VkDevice InDevice)
DetourTransactionBegin();
DetourUpdateThread(GetCurrentThread());
DetourAttach(&(PVOID&) o_QueuePresentKHR, hkvkQueuePresentKHR);
DetourAttach(&(PVOID&) o_CreateSwapchainKHR, hkvkCreateSwapchainKHR);
if (o_QueuePresentKHR != nullptr)
DetourAttach(&(PVOID&) o_QueuePresentKHR, hkvkQueuePresentKHR);
if (o_CreateSwapchainKHR != nullptr)
DetourAttach(&(PVOID&) o_CreateSwapchainKHR, hkvkCreateSwapchainKHR);
auto detourResult = DetourTransactionCommit();
if (detourResult != NO_ERROR)