Commit 193dc48b by Shannon Woods

Adds a null check in one additional location in setData

TRAC #23251 Author: Shannon Woods Signed-off-by: Jamie Madill Signed-off-by: Nicolas Capens
parent 570e04d8
...@@ -154,7 +154,7 @@ void BufferStorage11::setData(const void* data, unsigned int size, unsigned int ...@@ -154,7 +154,7 @@ void BufferStorage11::setData(const void* data, unsigned int size, unsigned int
mStagingBuffer = newStagingBuffer; mStagingBuffer = newStagingBuffer;
} }
if (offset != 0 || !createStagingBuffer) if (data && (offset != 0 || !createStagingBuffer))
{ {
D3D11_MAPPED_SUBRESOURCE mappedResource; D3D11_MAPPED_SUBRESOURCE mappedResource;
result = context->Map(mStagingBuffer, 0, D3D11_MAP_WRITE, 0, &mappedResource); result = context->Map(mStagingBuffer, 0, D3D11_MAP_WRITE, 0, &mappedResource);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment