test/testshape.c
changeset 11058 62185069194d
parent 10737 3406a0f8b041
child 11080 1677ac34c68c
     1.1 --- a/test/testshape.c	Fri Jun 02 22:15:12 2017 +0200
     1.2 +++ b/test/testshape.c	Fri Jun 02 22:15:23 2017 +0200
     1.3 @@ -81,7 +81,6 @@
     1.4          pictures[i].surface = SDL_LoadBMP(argv[i+1]);
     1.5          pictures[i].name = argv[i+1];
     1.6          if(pictures[i].surface == NULL) {
     1.7 -            j = 0;
     1.8              for(j=0;j<num_pictures;j++)
     1.9                  SDL_FreeSurface(pictures[j].surface);
    1.10              SDL_free(pictures);
    1.11 @@ -130,8 +129,7 @@
    1.12      for(i=0;i<num_pictures;i++) {
    1.13          pictures[i].texture = SDL_CreateTextureFromSurface(renderer,pictures[i].surface);
    1.14          if(pictures[i].texture == NULL) {
    1.15 -            j = 0;
    1.16 -            for(j=0;j<num_pictures;i++)
    1.17 +            for(i=0;i<num_pictures;i++)
    1.18                  if(pictures[i].texture != NULL)
    1.19                      SDL_DestroyTexture(pictures[i].texture);
    1.20              for(i=0;i<num_pictures;i++)