From 5852e318e521558bc7e89d88a8b0cfd74b1fd65a Mon Sep 17 00:00:00 2001 From: gofman Date: Wed, 6 Jan 2021 22:10:44 +0300 Subject: [PATCH] [d3d11] Fix device ref counting from queries. (#1887) Fixes AO Tennis 2 crash on exit. Co-authored-by: Paul Gofman --- src/d3d11/d3d11_query.cpp | 2 +- src/d3d11/d3d11_query.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/d3d11/d3d11_query.cpp b/src/d3d11/d3d11_query.cpp index d2ac5dc54..afe1a84a0 100644 --- a/src/d3d11/d3d11_query.cpp +++ b/src/d3d11/d3d11_query.cpp @@ -126,7 +126,7 @@ namespace dxvk { void STDMETHODCALLTYPE D3D11Query::GetDevice(ID3D11Device **ppDevice) { - *ppDevice = ref(m_device); + *ppDevice = m_device.ref(); } diff --git a/src/d3d11/d3d11_query.h b/src/d3d11/d3d11_query.h index b8c42f708..21378f443 100644 --- a/src/d3d11/d3d11_query.h +++ b/src/d3d11/d3d11_query.h @@ -96,7 +96,7 @@ namespace dxvk { private: - D3D11Device* const m_device; + const Com m_device; D3D11_QUERY_DESC1 m_desc; D3D11_VK_QUERY_STATE m_state;