diff options
author | Eric Anholt <[email protected]> | 2006-04-09 17:48:28 +0000 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2006-04-09 17:48:28 +0000 |
commit | 8c3d15ce28f90e41002eaddc8ac9304c8b3dbab9 (patch) | |
tree | ea72be444884157b86694f78449ba76698fb32e5 /src/mesa/drivers/dri/r200/r200_context.c | |
parent | 83a43aca233cfdf8f8cac26895ef4ea4105d96af (diff) |
Destroy the GL context after driDestroyTextureHeap, because the driver's
DestroyTexObj has a dependence on the glCtx and may segfault otherwise.
Diffstat (limited to 'src/mesa/drivers/dri/r200/r200_context.c')
-rw-r--r-- | src/mesa/drivers/dri/r200/r200_context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/r200/r200_context.c b/src/mesa/drivers/dri/r200/r200_context.c index 210feddb6a9..aaaaa5a95bf 100644 --- a/src/mesa/drivers/dri/r200/r200_context.c +++ b/src/mesa/drivers/dri/r200/r200_context.c @@ -590,10 +590,6 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) r200VtxfmtDestroy( rmesa->glCtx ); } - /* free the Mesa context */ - rmesa->glCtx->DriverCtx = NULL; - _mesa_destroy_context( rmesa->glCtx ); - if (rmesa->state.scissor.pClipRects) { FREE(rmesa->state.scissor.pClipRects); rmesa->state.scissor.pClipRects = NULL; @@ -613,6 +609,10 @@ void r200DestroyContext( __DRIcontextPrivate *driContextPriv ) assert( is_empty_list( & rmesa->swapped ) ); } + /* free the Mesa context */ + rmesa->glCtx->DriverCtx = NULL; + _mesa_destroy_context( rmesa->glCtx ); + /* free the option cache */ driDestroyOptionCache (&rmesa->optionCache); |