Skip to content
This repository has been archived by the owner on Jan 4, 2025. It is now read-only.

Commit

Permalink
fix: crash when %%staves at end of tune and lack of music in the last…
Browse files Browse the repository at this point in the history
… voice

Issue #69
  • Loading branch information
moinejf committed Feb 4, 2020
1 parent f985cf1 commit 309f1c3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion music.c
Original file line number Diff line number Diff line change
Expand Up @@ -2632,8 +2632,10 @@ static void set_clefs(void)
&& new_line == staff_clef[staff].clef->u.clef.line)
continue;
g = s;
while (g->voice != voice)
while (g && g->voice != voice)
g = g->ts_next;
if (!g)
continue;
if (g->type != CLEF) {
g = insert_clef(g, new_type, new_line);
if (s2->sflags & S_CLEF_AUTO)
Expand Down

0 comments on commit 309f1c3

Please sign in to comment.