From a03c038f031a667bb571c6935c5729884b33510a Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Sat, 12 Feb 2022 15:30:38 +0100 Subject: [PATCH] [d3d9] Exit early in ProcessVertices if the vertex count is 0 We don't want to pass a zero-sized copy to the backend. --- src/d3d9/d3d9_device.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/d3d9/d3d9_device.cpp b/src/d3d9/d3d9_device.cpp index b531f46a..bc11b0a9 100644 --- a/src/d3d9/d3d9_device.cpp +++ b/src/d3d9/d3d9_device.cpp @@ -2598,6 +2598,9 @@ namespace dxvk { return D3D_OK; } + if (!VertexCount) + return D3D_OK; + D3D9CommonBuffer* dst = static_cast(pDestBuffer)->GetCommonBuffer(); D3D9VertexDecl* decl = static_cast (pVertexDecl);