mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 13:00:32 +00:00
Ensure we AddRef when returning an existing ID3DDeviceContextState
* Fixes a crash with Firefox and other D2D using applications.
This commit is contained in:
@@ -1994,9 +1994,15 @@ void WrappedID3D11DeviceContext::SwapDeviceContextState(ID3DDeviceContextState *
|
||||
WrappedID3DDeviceContextState *wrapped = NULL;
|
||||
|
||||
if(m_pDevice->GetResourceManager()->HasWrapper(prev))
|
||||
{
|
||||
wrapped = (WrappedID3DDeviceContextState *)m_pDevice->GetResourceManager()->GetWrapper(prev);
|
||||
|
||||
wrapped->AddRef();
|
||||
}
|
||||
else if(prev)
|
||||
{
|
||||
wrapped = new WrappedID3DDeviceContextState(prev, m_pDevice);
|
||||
}
|
||||
|
||||
if(wrapped)
|
||||
wrapped->state->CopyState(*m_CurrentPipelineState);
|
||||
|
||||
Reference in New Issue
Block a user