test/testshape.c
changeset 7720 f9a649383362
parent 7678 286c42d7c5ed
child 8102 c86987834681
equal deleted inserted replaced
7719:31b5f9ff36ca 7720:f9a649383362
    88     for(i=0;i<num_pictures;i++) {
    88     for(i=0;i<num_pictures;i++) {
    89         pictures[i].surface = SDL_LoadBMP(argv[i+1]);
    89         pictures[i].surface = SDL_LoadBMP(argv[i+1]);
    90         if(pictures[i].surface == NULL) {
    90         if(pictures[i].surface == NULL) {
    91             j = 0;
    91             j = 0;
    92             for(j=0;j<num_pictures;j++)
    92             for(j=0;j<num_pictures;j++)
    93                 if(pictures[j].surface != NULL)
    93                 SDL_FreeSurface(pictures[j].surface);
    94                     SDL_FreeSurface(pictures[j].surface);
       
    95             SDL_free(pictures);
    94             SDL_free(pictures);
    96             SDL_VideoQuit();
    95             SDL_VideoQuit();
    97             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not load surface from named bitmap file.");
    96             SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not load surface from named bitmap file.");
    98             exit(-3);
    97             exit(-3);
    99         }
    98         }