mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 10:24:12 +01:00
[util,d3d11] Be more robust against use-after-free
Sims 4 binds an SRV after destroying it, so we need to ensure our internal view pointers are null or we'll create a problem otherwise.
This commit is contained in:
parent
04d558cf2e
commit
427e706a40
@ -106,6 +106,7 @@ namespace dxvk {
|
||||
|
||||
D3D11DepthStencilView::~D3D11DepthStencilView() {
|
||||
ResourceReleasePrivate(m_resource);
|
||||
m_resource = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -116,6 +116,7 @@ namespace dxvk {
|
||||
|
||||
D3D11RenderTargetView::~D3D11RenderTargetView() {
|
||||
ResourceReleasePrivate(m_resource);
|
||||
m_resource = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -183,6 +183,7 @@ namespace dxvk {
|
||||
|
||||
D3D11ShaderResourceView::~D3D11ShaderResourceView() {
|
||||
ResourceReleasePrivate(m_resource);
|
||||
m_resource = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -129,6 +129,7 @@ namespace dxvk {
|
||||
|
||||
D3D11UnorderedAccessView::~D3D11UnorderedAccessView() {
|
||||
ResourceReleasePrivate(m_resource);
|
||||
m_resource = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
@ -96,6 +96,7 @@ namespace dxvk {
|
||||
|
||||
~Com() {
|
||||
this->decRef();
|
||||
m_ptr = nullptr;
|
||||
}
|
||||
|
||||
T* operator -> () const {
|
||||
|
@ -86,6 +86,7 @@ namespace dxvk {
|
||||
|
||||
~Rc() {
|
||||
this->decRef();
|
||||
m_object = nullptr;
|
||||
}
|
||||
|
||||
T& operator * () const { return *m_object; }
|
||||
|
Loading…
Reference in New Issue
Block a user