projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1ba8e95
)
nvc0: fix a crash on context destruction
author
Ben Skeggs
<bskeggs@redhat.com>
Tue, 1 Mar 2011 07:08:03 +0000
(17:08 +1000)
committer
Ben Skeggs
<bskeggs@redhat.com>
Tue, 1 Mar 2011 07:23:31 +0000
(17:23 +1000)
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
src/gallium/drivers/nvc0/nvc0_context.c
patch
|
blob
|
history
diff --git
a/src/gallium/drivers/nvc0/nvc0_context.c
b/src/gallium/drivers/nvc0/nvc0_context.c
index d5dcf1fb0280dc1d6a781b1a8a91f6e8cf5e736c..d6de979b132d0f46ee2a45621ef2a9c14f9cce18 100644
(file)
--- a/
src/gallium/drivers/nvc0/nvc0_context.c
+++ b/
src/gallium/drivers/nvc0/nvc0_context.c
@@
-62,8
+62,10
@@
nvc0_destroy(struct pipe_context *pipe)
draw_destroy(nvc0->draw);
- if (nvc0->screen->cur_ctx == nvc0)
+ if (nvc0->screen->cur_ctx == nvc0) {
+ nvc0->screen->base.channel->user_private = NULL;
nvc0->screen->cur_ctx = NULL;
+ }
FREE(nvc0);
}
@@
-73,8
+75,10
@@
nvc0_default_flush_notify(struct nouveau_channel *chan)
{
struct nvc0_context *nvc0 = chan->user_private;
- nouveau_fence_update(&nvc0->screen->base, TRUE);
+ if (!nvc0)
+ return;
+ nouveau_fence_update(&nvc0->screen->base, TRUE);
nouveau_fence_next(&nvc0->screen->base);
}