Mesa (master): nv30: avoid dangling references to deleted contexts

Ilia Mirkin imirkin at kemper.freedesktop.org
Thu Jun 19 05:25:56 UTC 2014


Module: Mesa
Branch: master
Commit: c092c46b27c6f6a6674e8d67fb3afdb684811819
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c092c46b27c6f6a6674e8d67fb3afdb684811819

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Tue Jun 17 22:32:03 2014 -0400

nv30: avoid dangling references to deleted contexts

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>

---

 src/gallium/drivers/nouveau/nv30/nv30_context.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/gallium/drivers/nouveau/nv30/nv30_context.c b/src/gallium/drivers/nouveau/nv30/nv30_context.c
index f325c5c..617b088 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)




More information about the mesa-commit mailing list