From b3e2c99b174e1498eb5dac6374229aaef59e2851 Mon Sep 17 00:00:00 2001 From: Kp Date: Tue, 20 Aug 2013 02:58:15 +0000 Subject: [PATCH] Use MALLOC for ogl_init_pixel_buffers --- similar/arch/ogl/ogl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/similar/arch/ogl/ogl.c b/similar/arch/ogl/ogl.c index 48ba9d7f0..41045fd5e 100644 --- a/similar/arch/ogl/ogl.c +++ b/similar/arch/ogl/ogl.c @@ -1268,11 +1268,11 @@ void ogl_init_pixel_buffers(int w, int h) if (pixels) d_free(pixels); - pixels = d_malloc(w*h*4); + MALLOC(pixels, GLubyte, w*h*4); if (texbuf) d_free(texbuf); - texbuf = d_malloc(max(w, 1024)*max(h, 256)*4); // must also fit big font texture + MALLOC(texbuf, GLubyte, max(w, 1024u)*max(h, 256u)*4); // must also fit big font texture if ((pixels == NULL) || (texbuf == NULL)) Error("Not enough memory for current resolution");