The declaration of glPopAttrib was missing the parameter.