Added missing resource release in test source.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 18 Nov 2013 23:45:46 +0100
changeset 8010 ffd65b452bd2
parent 8009 c185ac7fb771
child 8011 126cd9fd8b61
Added missing resource release in test source.
src/test/SDL_test_common.c
--- a/src/test/SDL_test_common.c	Mon Nov 18 23:43:15 2013 +0100
+++ b/src/test/SDL_test_common.c	Mon Nov 18 23:45:46 2013 +0100
@@ -1424,6 +1424,14 @@
         }
         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();
     }