summaryrefslogtreecommitdiff
path: root/src/gallium
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-06-17 22:32:03 -0400
committerCarl Worth <cworth@cworth.org>2014-06-23 15:00:00 -0700
commitaca2d98c35b795bd7124527bd320e0d10adcf658 (patch)
tree79ea1455658973dca8c04caab9025a6c64365fbd /src/gallium
parent08317fa9c4183e051d16f65eead742a39fd83014 (diff)
nv30: avoid dangling references to deleted contexts
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: "10.2" <mesa-stable@lists.freedesktop.org> (cherry picked from commit c092c46b27c6f6a6674e8d67fb3afdb684811819)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/nouveau/nv30/nv30_context.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.c b/src/gallium/drivers/nouveau/nv30/nv30_context.c
index f325c5cfc68..617b0887810 100644
--- a/src/gallium/drivers/nouveau/nv30/nv30_context.c
+++ b/src/gallium/drivers/nouveau/nv30/nv30_context.c
@@ -165,6 +165,9 @@ nv30_context_destroy(struct pipe_context *pipe)
if (nv30->draw)
draw_destroy(nv30->draw);
+ if (nv30->screen->base.pushbuf->user_priv == &nv30->bufctx)
+ nv30->screen->base.pushbuf->user_priv = NULL;
+
nouveau_bufctx_del(&nv30->bufctx);
if (nv30->screen->cur_ctx == nv30)