summaryrefslogtreecommitdiff
path: root/src/mesa/main/attrib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/attrib.c')
-rw-r--r--src/mesa/main/attrib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index 66e6aadc0f..c3c1f927fd 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -47,10 +47,10 @@
#include "stencil.h"
#include "texobj.h"
#include "texstate.h"
+#include "varray.h"
#include "mtypes.h"
#include "math/m_xform.h"
-
/**
* Special struct for saving/restoring texture state (GL_TEXTURE_BIT)
*/
@@ -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 );