From 4d70d59ea4f1919dbfda0c5835ed6885e3579347 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Mon, 25 May 2020 13:29:56 +0100 Subject: [PATCH] [d3d9] Use base texture for subresource refs Fixes a crash when running d3d9-triangle --- src/d3d9/d3d9_subresource.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/d3d9/d3d9_subresource.h b/src/d3d9/d3d9_subresource.h index b9f961a76..b058499c7 100644 --- a/src/d3d9/d3d9_subresource.h +++ b/src/d3d9/d3d9_subresource.h @@ -32,15 +32,15 @@ namespace dxvk { } ULONG STDMETHODCALLTYPE AddRef() final { - if (m_container != nullptr) - return m_container->AddRef(); + if (m_baseTexture != nullptr) + return m_baseTexture->AddRef(); return D3D9Resource::AddRef(); } ULONG STDMETHODCALLTYPE Release() final { - if (m_container != nullptr) - return m_container->Release(); + if (m_baseTexture != nullptr) + return m_baseTexture->Release(); return D3D9Resource::Release(); }