From 13331a463f08ce916bc07ca26bcdf1896517eea6 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Tue, 6 Mar 2018 11:35:12 +0100 Subject: [PATCH] [d3d11] Re-implement check for mapping device-local images --- src/d3d11/d3d11_context_imm.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/d3d11/d3d11_context_imm.cpp b/src/d3d11/d3d11_context_imm.cpp index 7a7bfad7..54ec2601 100644 --- a/src/d3d11/d3d11_context_imm.cpp +++ b/src/d3d11/d3d11_context_imm.cpp @@ -150,6 +150,11 @@ namespace dxvk { // We use a buffer instead and then perform a copy. D3D11TextureInfo* textureInfo = GetCommonTextureInfo(pResource); + if (textureInfo->imageBuffer == nullptr) { + Logger::err("D3D11: Cannot map a device-local image"); + return E_INVALIDARG; + } + if (pMappedResource == nullptr) return S_FALSE;