gallium: fix refcount bug introduced in eb20e2984

This commit is contained in:
Keith Whitwell 2008-12-12 18:34:49 +00:00
parent 56f36ed166
commit 3a5d260cb1
1 changed files with 5 additions and 4 deletions

View File

@ -670,12 +670,13 @@ st_draw_vbo(GLcontext *ctx,
}
/* unreference buffers (frees wrapped user-space buffer objects) */
for (attr = 0; attr < num_vbuffers; attr++) {
pipe_buffer_reference(pipe->screen, &vbuffer[attr].buffer, NULL);
assert(!vbuffer[attr].buffer);
}
if (userSpace)
{
for (attr = 0; attr < num_vbuffers; attr++) {
pipe_buffer_reference(pipe->screen, &vbuffer[attr].buffer, NULL);
assert(!vbuffer[attr].buffer);
}
pipe->set_vertex_buffers(pipe, 0, NULL);
}
}