Skip to content
Snippets Groups Projects
Commit f6fbd8ea authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Only call xptone_complete() if there's foreground notes

Otherwise there's a race condition that will crash Win32 at least.
Fixes ticket 199.
parent 370f7dde
No related branches found
No related tags found
No related merge requests found
Pipeline #8822 passed
...@@ -902,12 +902,14 @@ static void play_music(struct cterminal *cterm) ...@@ -902,12 +902,14 @@ static void play_music(struct cterminal *cterm)
} }
cterm->music=0; cterm->music=0;
cterm->musicbuf[0]=0; cterm->musicbuf[0]=0;
if (fore_count) {
while(fore_count) { while(fore_count) {
sem_wait(&cterm->note_completed_sem); sem_wait(&cterm->note_completed_sem);
fore_count--; fore_count--;
} }
xptone_complete(); xptone_complete();
} }
}
void void
cterm_clreol(struct cterminal *cterm) cterm_clreol(struct cterminal *cterm)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment