Explorar o código

Added missing resource release in test source.

Philipp Wiesemann %!s(int64=12) %!d(string=hai) anos
pai
achega
48cffe33f9
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      src/test/SDL_test_common.c

+ 8 - 0
src/test/SDL_test_common.c

@@ -1424,6 +1424,14 @@ SDLTest_CommonQuit(SDLTest_CommonState * state)
         }
         SDL_free(state->renderers);
     }
+    if (state->targets) {
+        for (i = 0; i < state->num_windows; ++i) {
+            if (state->targets[i]) {
+                SDL_DestroyTexture(state->targets[i]);
+            }
+        }
+        SDL_free(state->targets);
+    }
     if (state->flags & SDL_INIT_VIDEO) {
         SDL_VideoQuit();
     }