From 24d55fde9fd0f650c250db8f824ba01caaf310f3 Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 27 Jun 2019 09:14:48 +0100 Subject: [PATCH] Don't crash in CreateUnorderedAccessView if a NULL descriptor is passed --- renderdoc/driver/d3d11/d3d11_device_wrap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renderdoc/driver/d3d11/d3d11_device_wrap.cpp b/renderdoc/driver/d3d11/d3d11_device_wrap.cpp index 2a3832249..8804f1d74 100644 --- a/renderdoc/driver/d3d11/d3d11_device_wrap.cpp +++ b/renderdoc/driver/d3d11/d3d11_device_wrap.cpp @@ -1028,7 +1028,7 @@ HRESULT WrappedID3D11Device::CreateUnorderedAccessView(ID3D11Resource *pResource // if this UAV has a hidden counter, immediately mark it as dirty so we force initial // contents to fetch its counter - if(pDesc->ViewDimension == D3D11_UAV_DIMENSION_BUFFER && + if(pDesc && pDesc->ViewDimension == D3D11_UAV_DIMENSION_BUFFER && (pDesc->Buffer.Flags & (D3D11_BUFFER_UAV_FLAG_COUNTER | D3D11_BUFFER_UAV_FLAG_APPEND)) != 0) { GetResourceManager()->MarkDirtyResource(id);