1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-11-30 22:24:15 +01:00

[d3d11] Fix optional write issue in GetData()

This commit is contained in:
Philip Rebohle 2018-02-07 12:35:40 +01:00
parent a473c914f4
commit 61ce7022e2
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -164,6 +164,11 @@ namespace dxvk {
void* pData,
UINT DataSize,
UINT GetDataFlags) {
// Make sure that we can safely write to the memory
// location pointed to by pData if it is specified.
if (DataSize == 0)
pData = nullptr;
if (pData != nullptr && pAsync->GetDataSize() != DataSize) {
Logger::err(str::format("D3D11DeviceContext: GetData: Data size mismatch: ", pAsync->GetDataSize(), ",", DataSize));
return E_INVALIDARG;