Skip to content

Commit 8e4ff5f

Browse files
committed
Check that list is not empty before working on it.
Fixes #1712
1 parent 086e55f commit 8e4ff5f

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

ly/musicxml/ly2xml_mediator.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,12 @@ def check_part(self):
294294

295295
def check_simultan(self):
296296
"""Check done after simultanoues (<< >>) section."""
297-
if self.part:
298-
self.part.merge_voice(self.sections[-1])
299-
elif len(self.sections)>1:
300-
self.sections[-2].merge_voice(self.sections[-1])
301-
self.sections.pop()
297+
if self.sections:
298+
if self.part:
299+
self.part.merge_voice(self.sections[-1])
300+
elif len(self.sections)>1:
301+
self.sections[-2].merge_voice(self.sections[-1])
302+
self.sections.pop()
302303

303304
def check_score(self):
304305
"""

0 commit comments

Comments
 (0)