mesa: Fix null buffer object reference counting.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 1 Feb 2010 21:30:50 +0000 (21:30 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 9 Feb 2010 11:52:05 +0000 (11:52 +0000)
commit05ac187f305bb653d569b5c07446ec0f4cd7ff08
treeff87c0cfe76e67e55496563dbfbb5f4cb576dc81
parent1c39dbb90cefad8a5a97e75042466d66ea4270bc
mesa: Fix null buffer object reference counting.

Always use _mesa_reference_buffer_object, and never call
ctx->Driver.DeleteBuffer() directly to prevent dangling pointers to the
null buffer object.

This fixes crash/assertions in sharedtex_mt and Autodesk Mudbox.
src/mesa/main/shared.c
src/mesa/vbo/vbo_save.c