浏览代码

Better fix for static analysis issue in SDL_DestroyRenderer().

Follow up fix for Bugzilla #3544.
Ryan C. Gordon 8 年之前
父节点
当前提交
c1ac4c6835
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/render/SDL_render.c

+ 2 - 0
src/render/SDL_render.c

@@ -1938,7 +1938,9 @@ SDL_DestroyRenderer(SDL_Renderer * renderer)
 
 
     /* Free existing textures for this renderer */
     /* Free existing textures for this renderer */
     while (renderer->textures) {
     while (renderer->textures) {
+        SDL_Texture *tex = renderer->textures;
         SDL_DestroyTexture(renderer->textures);
         SDL_DestroyTexture(renderer->textures);
+        SDL_assert(tex != renderer->textures);  /* satisfy static analysis. */
     }
     }
 
 
     if (renderer->window) {
     if (renderer->window) {