diff options
Diffstat (limited to 'src/mesa/tnl/t_context.c')
-rw-r--r-- | src/mesa/tnl/t_context.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/tnl/t_context.c b/src/mesa/tnl/t_context.c index 30b2947323..d9777bfe6d 100644 --- a/src/mesa/tnl/t_context.c +++ b/src/mesa/tnl/t_context.c @@ -87,11 +87,11 @@ _tnl_CreateContext( GLcontext *ctx ) _tnl_vtx_init( ctx ); if (ctx->_MaintainTnlProgram) { - tnl->vp_cache = MALLOC(sizeof(*tnl->vp_cache)); + tnl->vp_cache = (struct tnl_cache *) MALLOC(sizeof(*tnl->vp_cache)); tnl->vp_cache->size = 5; tnl->vp_cache->n_items = 0; - tnl->vp_cache->items = MALLOC(tnl->vp_cache->size * - sizeof(*tnl->vp_cache->items)); + tnl->vp_cache->items = (struct tnl_cache_item**) + _mesa_malloc(tnl->vp_cache->size * sizeof(*tnl->vp_cache->items)); _mesa_memset(tnl->vp_cache->items, 0, tnl->vp_cache->size * sizeof(*tnl->vp_cache->items)); |