mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
Fix wrapper init error-path use-after-free
This commit is contained in:
parent
3e5f6d0084
commit
76728612ff
1 changed files with 3 additions and 2 deletions
|
|
@ -792,10 +792,11 @@ WOWEE_FSR3_WRAPPER_EXPORT int32_t wowee_fsr3_wrapper_initialize(const WoweeFsr3W
|
|||
&backendShared, ffxDevice, ctx->scratchBuffer, ctx->scratchBufferSize, FFX_FSR3_CONTEXT_COUNT);
|
||||
}
|
||||
if (ifaceErr != FFX_OK) {
|
||||
const bool wasDx12Backend = (ctx->backend == WrapperBackend::Dx12Bridge);
|
||||
destroyContext(ctx);
|
||||
writeError(outErrorText, outErrorTextCapacity,
|
||||
ctx->backend == WrapperBackend::Dx12Bridge ? "ffxGetInterfaceDX12 failed"
|
||||
: "ffxGetInterfaceVK failed");
|
||||
wasDx12Backend ? "ffxGetInterfaceDX12 failed"
|
||||
: "ffxGetInterfaceVK failed");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue