From 65a9ea458648de1427939f5d453946893653b538 Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Mon, 29 Oct 2012 03:15:23 +0100 Subject: [PATCH] graphics: avoid error in case of multiple rremove: same behavior as remove_widget(). closes #481 --- kivy/graphics/instructions.pyx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kivy/graphics/instructions.pyx b/kivy/graphics/instructions.pyx index 10e8ca3ba..12a3579d3 100644 --- a/kivy/graphics/instructions.pyx +++ b/kivy/graphics/instructions.pyx @@ -69,6 +69,8 @@ cdef class Instruction: self.set_parent(ig) cdef void rremove(self, InstructionGroup ig): + if self.parent is None: + return ig.children.remove(self) self.set_parent(None)