mesa: avoid to unlock an unlocked array in _mesa_PopClientAttrib
authorXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2008 08:48:36 +0000 (16:48 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Mon, 17 Mar 2008 08:48:36 +0000 (16:48 +0800)
src/mesa/main/attrib.c

index 66e6aadc0f0afbb0a9bf7a629356ea67ecdd6ce4..80c989e564914d372c4d940864a4367e1f5d0939 100644 (file)
@@ -1401,7 +1401,7 @@ _mesa_PopClientAttrib(void)
             ctx->Array.ActiveTexture = data->ActiveTexture;
            if (data->LockCount != 0)
               _mesa_LockArraysEXT(data->LockFirst, data->LockCount);
-           else
+           else if (ctx->Array.LockCount)
               _mesa_UnlockArraysEXT();
 
            _mesa_BindVertexArrayAPPLE( data->ArrayObj->Name );