d3d11: Don't fail if there's no vertex data to upload (thanks, Martin!). Fixes Bugzilla #4832.
diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c
index d75da71..720622d 100644
--- a/src/render/direct3d11/SDL_render_d3d11.c
+++ b/src/render/direct3d11/SDL_render_d3d11.c
@@ -1818,6 +1818,10 @@ D3D11_UpdateVertexBuffer(SDL_Renderer *renderer,
HRESULT result = S_OK;
const int vbidx = rendererData->currentVertexBuffer;
+ if (dataSizeInBytes == 0) {
+ return 0; /* nothing to do. */
+ }
+
if (rendererData->vertexBuffers[vbidx] && rendererData->vertexBufferSizes[vbidx] >= dataSizeInBytes) {
D3D11_MAPPED_SUBRESOURCE mappedResource;
result = ID3D11DeviceContext_Map(rendererData->d3dContext,