mesa: move unrefs of array objects earlier in _mesa_free_context_data()
authorBrian Paul <brianp@vmware.com>
Thu, 19 Apr 2012 13:56:05 +0000 (07:56 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Apr 2012 17:22:37 +0000 (11:22 -0600)
commit0e5327ecf49744f620b0a73b8780ad5dbb74eeb6
tree38e5fe3cb0ad95535317366e313edce0c204ffa0
parent939b26639fdc0913c5670b7fa20aab1f41b2b155
mesa: move unrefs of array objects earlier in _mesa_free_context_data()

If a non-default array object was bound at context destruction time
we'd try to unreference the array object after it was already deleted
in _mesa_free_varray_data().  Now do the unref first.

Fixes a regression from commit 86f53e6d6bd07e2bc3ffcadeb9a4418fbae06e0b.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
src/mesa/main/context.c