Commit 48cffe33f92f2e8a902f71cc7b5ca25bb1053d27

Philipp Wiesemann 2013-11-18T23:45:46

Added missing resource release in test source.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index e23b5bb..cd4328e 100644
--- a/src/test/SDL_test_common.c
+++ b/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();
     }