Skip to content

Commit de081b1

Browse files
committed
Bar.create_backup(): don't add backup element if it has no duration
1 parent dd0b316 commit de081b1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ly/musicxml/xml_objs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,8 @@ def create_backup(self):
458458
s *= obj.duration[1]
459459
elif isinstance(obj, BarBackup):
460460
break
461-
self.add(BarBackup((b, s)))
461+
if b != 0:
462+
self.add(BarBackup((b, s)))
462463

463464
def is_skip(self, obj_list=None):
464465
""" Check if bar has nothing but skips. """

0 commit comments

Comments
 (0)