Commit 3fa5a2f794e7e7814c0e19b494af9e32abd75ea5

Sam Lantinga 2023-02-06T11:22:00

Fixed warning running a command queue without any vertex operations (cherry picked from commit f8b41919dac0fb95553f910d02faafc6d7205692)

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c
index 75ca3b4..e995a38 100644
--- a/src/render/direct3d/SDL_render_d3d.c
+++ b/src/render/direct3d/SDL_render_d3d.c
@@ -1108,7 +1108,7 @@ static int D3D_RunCommandQueue(SDL_Renderer *renderer, SDL_RenderCommand *cmd, v
         return -1;
     }
 
-    if (vertices) {
+    if (vertsize > 0) {
         /* upload the new VBO data for this set of commands. */
         vbo = data->vertexBuffers[vboidx];
         if (data->vertexBufferSize[vboidx] < vertsize) {