From 239792fb221556fbc0da6c046541ea078b6944db Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 18 May 2012 15:32:10 -0600 Subject: [PATCH] st/mesa: use pipe_sampler_view_release() in st_destroy_context_priv() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes another case of sampler views being created by one context, shared by another, then deleted by the first, leaving a dangling pipe context pointer. Reviewed-by: José Fonseca --- src/mesa/state_tracker/st_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c index b4497652539..132dcc02f96 100644 --- a/src/mesa/state_tracker/st_context.c +++ b/src/mesa/state_tracker/st_context.c @@ -247,7 +247,7 @@ static void st_destroy_context_priv( struct st_context *st ) st_destroy_drawtex(st); for (i = 0; i < Elements(st->state.sampler_views); i++) { - pipe_sampler_view_reference(&st->state.sampler_views[i], NULL); + pipe_sampler_view_release(st->pipe, &st->state.sampler_views[i]); } if (st->default_texture) { -- 2.11.0