Prevent crash if programmatic capture happens after deleting swapchain

This commit is contained in:
baldurk
2025-05-13 15:16:42 +01:00
parent 2665c1f65c
commit b19c5b9f73
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -1635,6 +1635,9 @@ void WrappedID3D11Device::ReleaseSwapchainResources(IDXGISwapper *swapper, UINT
IUnknown *const *ppPresentQueue,
IUnknown **unwrappedQueues)
{
if(m_LastSwap == swapper)
m_LastSwap = NULL;
RDCASSERT(ppPresentQueue == NULL);
if(ppPresentQueue)
+3
View File
@@ -1701,6 +1701,9 @@ void WrappedID3D12Device::ReleaseSwapchainResources(IDXGISwapper *swapper, UINT
IUnknown *const *ppPresentQueue,
IUnknown **unwrappedQueues)
{
if(m_LastSwap == swapper)
m_LastSwap = NULL;
if(ppPresentQueue)
{
for(UINT i = 0; i < QueueCount; i++)