From 3cf156df2b5561d52f3bdddf857fcc176e4134b5 Mon Sep 17 00:00:00 2001 From: Aapo Tahkola Date: Tue, 1 Nov 2005 15:43:06 +0000 Subject: Fix segmentation fault in _tnl_ProgramCacheDestroy(). --- src/mesa/tnl/t_vp_build.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/mesa/tnl/t_vp_build.c') diff --git a/src/mesa/tnl/t_vp_build.c b/src/mesa/tnl/t_vp_build.c index 8e52e7125c..02e5a2aa1b 100644 --- a/src/mesa/tnl/t_vp_build.c +++ b/src/mesa/tnl/t_vp_build.c @@ -1479,16 +1479,6 @@ void _tnl_UpdateFixedFunctionProgram( GLcontext *ctx ) key = make_state_key(ctx); hash = hash_key(key); - if (tnl->vp_cache == NULL) { - tnl->vp_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)); - _mesa_memset(tnl->vp_cache->items, 0, tnl->vp_cache->size * - sizeof(*tnl->vp_cache->items)); - } - /* Look for an already-prepared program for this state: */ ctx->_TnlProgram = (struct vertex_program *) -- cgit v1.2.3