Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Zero streaming textures to reduce confusion.
Browse files Browse the repository at this point in the history
(See mailing list message with subject "Streaming textures not properly initialized?")
  • Loading branch information
slouken committed Feb 18, 2011
1 parent de3379d commit 9d3bb67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/render/SDL_render.c
Expand Up @@ -312,7 +312,7 @@ SDL_CreateTexture(SDL_Renderer * renderer, Uint32 format, int access, int w, int
} else if (access == SDL_TEXTUREACCESS_STREAMING) {
/* The pitch is 4 byte aligned */
texture->pitch = (((w * SDL_BYTESPERPIXEL(format)) + 3) & ~3);
texture->pixels = SDL_malloc(texture->pitch * h);
texture->pixels = SDL_calloc(1, texture->pitch * h);
if (!texture->pixels) {
SDL_DestroyTexture(texture);
return NULL;
Expand Down

0 comments on commit 9d3bb67

Please sign in to comment.