diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 8309fabd5..d31f72977 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) {