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

[d3d11] add check for pResource against nullptr in D3D11ImmediateContext::Map()

This commit is contained in:
Mikhail Paulyshka 2018-03-12 01:54:03 +03:00
parent 4eacff21e9
commit f94ff7db4f

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);