diff options
author | Ben Skeggs <[email protected]> | 2008-03-02 16:35:47 +1100 |
---|---|---|
committer | Ben Skeggs <[email protected]> | 2008-03-02 16:35:47 +1100 |
commit | 578b5cd9a030189bcba5c3e86080e1e26eb6e108 (patch) | |
tree | e28b8acbcad926bc2fa48fe2e05bf23417520dfb /src | |
parent | a414173105a18a0c6ed3b03ef986eb6eb30f7a58 (diff) |
nouveau: fix potential crash
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/winsys/dri/nouveau/nouveau_context.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/winsys/dri/nouveau/nouveau_context.c b/src/gallium/winsys/dri/nouveau/nouveau_context.c index dc852c9f498..2e54729aa97 100644 --- a/src/gallium/winsys/dri/nouveau/nouveau_context.c +++ b/src/gallium/winsys/dri/nouveau/nouveau_context.c @@ -256,8 +256,10 @@ nouveau_context_destroy(__DRIcontextPrivate *driContextPriv) if (nv->pctx_id >= 0) { nvc->pctx[nv->pctx_id] = NULL; - if (--nvc->refcount <= 0) + if (--nvc->refcount <= 0) { nouveau_channel_context_destroy(nvc); + nv->nv_screen->nvc = NULL; + } } free(nv); |