From 91c37599f621a0ec498c0f0add14f16470ca852b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 2 Jul 2010 18:18:15 -0600 Subject: osmesa: remove old renderbuffer before adding new Fixes fd.o bug 10966 when OSMesaMakeCurrent() was called twice. NOTE: This is a candidate for the 7.8 branch. --- src/mesa/drivers/osmesa/osmesa.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mesa') diff --git a/src/mesa/drivers/osmesa/osmesa.c b/src/mesa/drivers/osmesa/osmesa.c index ead40503977..93d0e8568a1 100644 --- a/src/mesa/drivers/osmesa/osmesa.c +++ b/src/mesa/drivers/osmesa/osmesa.c @@ -1328,6 +1328,7 @@ OSMesaMakeCurrent( OSMesaContext osmesa, void *buffer, GLenum type, * size. */ osmesa->rb = new_osmesa_renderbuffer(&osmesa->mesa, osmesa->format, type); + _mesa_remove_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT); _mesa_add_renderbuffer(osmesa->gl_buffer, BUFFER_FRONT_LEFT, osmesa->rb); assert(osmesa->rb->RefCount == 2); -- cgit v1.2.3