# HG changeset patch # User Emmanuel Gil Peyrot # Date 1371045810 -7200 # Node ID 9d790ca73c135066616666a131e3fd774c6a0329 # Parent 608468be7a934e679cbba2c92c170748c1ea41a5 Don’t render null-sized arrays of elements. diff --git a/pytouhou/ui/renderer.pyx b/pytouhou/ui/renderer.pyx --- a/pytouhou/ui/renderer.pyx +++ b/pytouhou/ui/renderer.pyx @@ -86,6 +86,9 @@ cdef class Renderer: nb_vertices += 4 + if nb_vertices == 0: + return + if self.use_fixed_pipeline: glVertexPointer(3, GL_INT, sizeof(Vertex), &self.vertex_buffer[0].x) glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), &self.vertex_buffer[0].u)