mesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)
authorBrian Paul <brianp@vmware.com>
Wed, 1 Feb 2012 01:24:07 +0000 (18:24 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 1 Feb 2012 14:11:44 +0000 (07:11 -0700)
commita1471e4877515e2ce4fcc129c4ce26f5c306b193
tree25d93b6fcd922a54ff36e7c08ea22ee1959f5746
parent361cd53a77dd48fbf2a0321446c0b7c07365bff9
mesa: reference shared state in glPushAttrib(GL_TEXTURE_BIT)

This fixes a dangling texture object pointer bug hit via wglShareLists().
When we push the GL_TEXTURE_BIT state we may push references to the default
texture objects which are owned by the gl_shared_state object.  We don't
want to accidentally delete that shared state while the attribute stack
references shared objects.  So keep a reference to it.

NOTE: This is a candidate for the 8.0 branch.

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