1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 04:29:15 +01:00

Merge pull request #151 from Mixaill/d3d11-nullcheck

[d3d11] add check for pResource against nullptr in D3D11ImmediateContext::Map()
This commit is contained in:
Philip Rebohle 2018-03-12 07:38:51 +01:00 committed by GitHub
commit a8508da883
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,6 +89,11 @@ namespace dxvk {
D3D11_MAP MapType,
UINT MapFlags,
D3D11_MAPPED_SUBRESOURCE* pMappedResource) {
if (pResource == nullptr) {
Logger::warn("D3D11ImmediateContext::Map() application tried to map a nullptr resource");
return DXGI_ERROR_INVALID_CALL;
}
D3D11_RESOURCE_DIMENSION resourceDim = D3D11_RESOURCE_DIMENSION_UNKNOWN;
pResource->GetType(&resourceDim);