test/testshape.c
changeset 10165 b30e5eed2600
parent 9998 f67cf37e9cd4
child 10737 3406a0f8b041
     1.1 --- a/test/testshape.c	Tue May 10 21:12:48 2016 +0200
     1.2 +++ b/test/testshape.c	Tue May 10 21:13:58 2016 +0200
     1.3 @@ -71,6 +71,10 @@
     1.4  
     1.5      num_pictures = argc - 1;
     1.6      pictures = (LoadedPicture *)SDL_malloc(sizeof(LoadedPicture)*num_pictures);
     1.7 +    if (!pictures) {
     1.8 +        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Could not allocate memory.");
     1.9 +        exit(1);
    1.10 +    }
    1.11      for(i=0;i<num_pictures;i++)
    1.12          pictures[i].surface = NULL;
    1.13      for(i=0;i<num_pictures;i++) {