mesa: add missing error check in _mesa_EndList()