mirror of https://github.com/kivy/kivy.git
Merge pull request #1249 from Aaron1011/empty_accordian_crash
Stopped empty accordian from accessing its first child when initialized
This commit is contained in:
commit
a8828f4e03
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue