mirror of
https://github.com/optiscaler/OptiScaler.git
synced 2026-08-25 07:36:45 +00:00
Added null checks before hooking
This commit is contained in:
@@ -60,8 +60,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)
|
||||
|
||||
Reference in New Issue
Block a user