summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2001-11-30 15:43:53 +0000
committerAlan Hourihane <alanh@tungstengraphics.com>2001-11-30 15:43:53 +0000
commitbce1689d5ba745d88cd2f56f7eebd61c43f68036 (patch)
treefea12a275b1787065fc6a0d2a9bd4a38b81d75e0 /src
parent7b2a146d3a7d3bb7ab6b60a829e25e076197da29 (diff)
Don't reset _tnl_CurrentInput when in DestroyContext.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/tnl/t_imm_exec.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/mesa/tnl/t_imm_exec.c b/src/mesa/tnl/t_imm_exec.c
index 8b55fec968..5b6d5d3d3c 100644
--- a/src/mesa/tnl/t_imm_exec.c
+++ b/src/mesa/tnl/t_imm_exec.c
@@ -1,4 +1,4 @@
-/* $Id: t_imm_exec.c,v 1.29 2001/08/02 22:39:51 keithw Exp $ */
+/* $Id: t_imm_exec.c,v 1.30 2001/11/30 15:43:53 alanh Exp $ */
/*
* Mesa 3-D graphics library
@@ -555,6 +555,13 @@ void _tnl_imm_destroy( GLcontext *ctx )
TNL_CURRENT_IM(ctx)->ref_count--;
if (TNL_CURRENT_IM(ctx)->ref_count == 0)
_tnl_free_immediate( TNL_CURRENT_IM(ctx) );
- SET_IMMEDIATE(ctx, 0);
+ /*
+ * Don't use SET_IMMEDIATE here, or else we'll whack the
+ * _tnl_CurrentInput pointer - not good when another
+ * context has already been made current.
+ * So we just set the context's own tnl immediate pointer
+ * to 0.
+ */
+ ctx->swtnl_im = 0;
}
}