summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/radeon
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2006-04-09 17:48:28 +0000
committerEric Anholt <[email protected]>2006-04-09 17:48:28 +0000
commit8c3d15ce28f90e41002eaddc8ac9304c8b3dbab9 (patch)
treeea72be444884157b86694f78449ba76698fb32e5 /src/mesa/drivers/dri/radeon
parent83a43aca233cfdf8f8cac26895ef4ea4105d96af (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/radeon')
-rw-r--r--src/mesa/drivers/dri/radeon/radeon_context.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/radeon/radeon_context.c b/src/mesa/drivers/dri/radeon/radeon_context.c
index 4c7730485b7..21161d2f69d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_context.c
+++ b/src/mesa/drivers/dri/radeon/radeon_context.c
@@ -521,10 +521,6 @@ void radeonDestroyContext( __DRIcontextPrivate *driContextPriv )
radeonVtxfmtDestroy( rmesa->glCtx );
}
- /* free the Mesa context */
- rmesa->glCtx->DriverCtx = NULL;
- _mesa_destroy_context( rmesa->glCtx );
-
_mesa_vector4f_free( &rmesa->tcl.ObjClean );
if (rmesa->state.scissor.pClipRects) {
@@ -546,6 +542,10 @@ void radeonDestroyContext( __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);