Added missing resource release in test source.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Mon, 18 Nov 2013 23:45:46 +0100
changeset 8010ffd65b452bd2
parent 8009 c185ac7fb771
child 8011 126cd9fd8b61
Added missing resource release in test source.
src/test/SDL_test_common.c
     1.1 --- a/src/test/SDL_test_common.c	Mon Nov 18 23:43:15 2013 +0100
     1.2 +++ b/src/test/SDL_test_common.c	Mon Nov 18 23:45:46 2013 +0100
     1.3 @@ -1424,6 +1424,14 @@
     1.4          }
     1.5          SDL_free(state->renderers);
     1.6      }
     1.7 +    if (state->targets) {
     1.8 +        for (i = 0; i < state->num_windows; ++i) {
     1.9 +            if (state->targets[i]) {
    1.10 +                SDL_DestroyTexture(state->targets[i]);
    1.11 +            }
    1.12 +        }
    1.13 +        SDL_free(state->targets);
    1.14 +    }
    1.15      if (state->flags & SDL_INIT_VIDEO) {
    1.16          SDL_VideoQuit();
    1.17      }