Commit be6bee0b5a07e73c317d54a2bc024e33e5d4ab42

Sylvain 2021-08-27T07:47:28

SW_RenderGeometry: add a redundant check to clear static analysis (see bug #4600)

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index e8021a0..6b30e88 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -3452,6 +3452,7 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer,
     }
 
     prev[0] = -1; prev[1] = -1; prev[2] = -1;
+    size_indices = indices ? size_indices : 0;
 
     for (i = 0; i < count; i += 3) {
         int k0, k1, k2; /* Current triangle indices */