src/render/opengles/SDL_render_gles.c
changeset 5402 5d102cd8aef3
parent 5355 cc2215cda170
child 5484 e20c93bc9122
equal deleted inserted replaced
5401:ccaccc76a196 5402:5d102cd8aef3
   320         return -1;
   320         return -1;
   321     }
   321     }
   322 
   322 
   323     if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
   323     if (texture->access == SDL_TEXTUREACCESS_STREAMING) {
   324         data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format);
   324         data->pitch = texture->w * SDL_BYTESPERPIXEL(texture->format);
   325         data->pixels = SDL_malloc(texture->h * data->pitch);
   325         data->pixels = SDL_calloc(1, texture->h * data->pitch);
   326         if (!data->pixels) {
   326         if (!data->pixels) {
   327             SDL_OutOfMemory();
   327             SDL_OutOfMemory();
   328             SDL_free(data);
   328             SDL_free(data);
   329             return -1;
   329             return -1;
   330         }
   330         }