Better fix for static analysis issue in SDL_DestroyRenderer(). Follow up fix for Bugzilla #3544.
diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c
index 8309fab..d31f729 100644
--- a/src/render/SDL_render.c
+++ b/src/render/SDL_render.c
@@ -1938,7 +1938,9 @@ SDL_DestroyRenderer(SDL_Renderer * renderer)
/* Free existing textures for this renderer */
while (renderer->textures) {
+ SDL_Texture *tex = renderer->textures;
SDL_DestroyTexture(renderer->textures);
+ SDL_assert(tex != renderer->textures); /* satisfy static analysis. */
}
if (renderer->window) {