]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - gl_rsurf.c
every malloc/calloc/free converted to qmalloc/qfree with tracking (memstats command...
[xonotic/darkplaces.git] / gl_rsurf.c
index 21d9d646bc5976db6ae0b4bd23115bfff41e6136..4377edc717e039979a0205f839d5510e5d554ccf 100644 (file)
@@ -1082,7 +1082,10 @@ int AllocBlock (int w, int h, short *x, short *y)
                if (nosubimagefragments || nosubimage)
                {
                        if (!lightmaps[texnum])
-                               lightmaps[texnum] = calloc(BLOCK_WIDTH*BLOCK_HEIGHT*4, 1);
+                       {
+                               lightmaps[texnum] = qmalloc(BLOCK_WIDTH*BLOCK_HEIGHT*4);
+                               memset(lightmaps[texnum], 0, BLOCK_WIDTH*BLOCK_HEIGHT*4);
+                       }
                }
                // LordHavoc: clear texture to blank image, fragments are uploaded using subimage
                else if (!allocated[texnum][0])