From 729e68123c219438753afa8f94e9932130762cd5 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Sat, 1 Jun 2013 08:29:33 -0400 Subject: [PATCH] Stopped empty accordian from accessing its first child when initialized --- kivy/uix/accordion.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kivy/uix/accordion.py b/kivy/uix/accordion.py index f9c360006..3345d59fc 100644 --- a/kivy/uix/accordion.py +++ b/kivy/uix/accordion.py @@ -386,7 +386,10 @@ class Accordion(Widget): def _do_layout(self, dt): children = self.children - all_collapsed = all(x.collapse for x in children) + if children: + all_collapsed = all(x.collapse for x in children) + else: + all_collapsed = False if all_collapsed: children[0].collapse = False