mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
_mesa_destroy_context() frees radeon->glCtx so we must not access it afterwards
This commit is contained in:
parent
bbe197ec1d
commit
aead688e7f
1 changed files with 6 additions and 5 deletions
|
|
@ -201,14 +201,15 @@ GLboolean radeonInitContext(radeonContextPtr radeon,
|
|||
*/
|
||||
void radeonCleanupContext(radeonContextPtr radeon)
|
||||
{
|
||||
/* _mesa_destroy_context() might result in calls to functions that
|
||||
* depend on the DriverCtx, so don't set it to NULL before.
|
||||
*
|
||||
* radeon->glCtx->DriverCtx = NULL;
|
||||
*/
|
||||
|
||||
/* free the Mesa context */
|
||||
_mesa_destroy_context(radeon->glCtx);
|
||||
|
||||
/* the above call might result in calls to functions that depend on
|
||||
* the DriverCtx.
|
||||
*/
|
||||
radeon->glCtx->DriverCtx = NULL;
|
||||
|
||||
if (radeon->state.scissor.pClipRects) {
|
||||
FREE(radeon->state.scissor.pClipRects);
|
||||
radeon->state.scissor.pClipRects = 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue