diff options
author | Carl Worth <cworth@cworth.org> | 2008-12-05 15:42:53 -0800 |
---|---|---|
committer | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2008-12-11 09:46:17 +0800 |
commit | 46249d548f581aafa06a5188cba7a9b94cf2916d (patch) | |
tree | 63a9c6da5a55f61fac2f950d605f5075ca6d520f /src | |
parent | 178a1629a89ed35b94cd25408063eeaa38f7e59b (diff) |
Set vertex_buffer_bo to NULL after unreference.
Which is just being tidy. We initially were looking at this code
path due to a report of a crash on server shutdown which started
after this unreference call was added. Setting this to NULL
apparently didn't avoid the crash, but it's a good thing to do
regardless.
(cherry picked from commit bea98cdfd93fc1181a06c51e57fcab227ff4827e)
Diffstat (limited to 'src')
-rw-r--r-- | src/i965_render.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/i965_render.c b/src/i965_render.c index a92c964a..df3814f5 100644 --- a/src/i965_render.c +++ b/src/i965_render.c @@ -1635,8 +1635,10 @@ gen4_render_state_cleanup(ScrnInfoPtr pScrn) I830Ptr pI830 = I830PTR(pScrn); struct gen4_render_state *render_state= pI830->gen4_render_state; - if (render_state->vertex_buffer_bo) + if (render_state->vertex_buffer_bo) { dri_bo_unreference (render_state->vertex_buffer_bo); + render_state->vertex_buffer_bo = NULL; + } if (pI830->use_drm_mode) { dri_bo_unmap(pI830->gen4_render_state_mem->bo); |