From 03730cb0204526f0d846659d18cd916704de83f7 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 8 Dec 2011 12:07:41 +0100 Subject: [PATCH] graphics: emit a warning when a quad have not enough point in the list (instead of having an exception during build() --- kivy/graphics/vertex_instructions.pyx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kivy/graphics/vertex_instructions.pyx b/kivy/graphics/vertex_instructions.pyx index a4ad1e078..f83331f68 100644 --- a/kivy/graphics/vertex_instructions.pyx +++ b/kivy/graphics/vertex_instructions.pyx @@ -723,6 +723,10 @@ cdef class Quad(VertexInstruction): return self._points def __set__(self, points): self._points = list(points) + if len(self._points) != 8: + raise GraphicException( + 'Quad: invalid number of points (%d instead of 8' % len( + self._points))) self.flag_update()