src/render/SDL_render.c
changeset 5342 d4b691de3b8f
parent 5333 5d3a2cd4e8c9
child 5368 f0ee2c086931
--- a/src/render/SDL_render.c	Thu Feb 17 18:55:56 2011 -0800
+++ b/src/render/SDL_render.c	Thu Feb 17 18:58:43 2011 -0800
@@ -312,7 +312,7 @@
         } 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;