bin/cue audio playback: fix teardown nesting in close_bincue

This commit is contained in:
rakslice
2025-01-07 20:20:17 -08:00
parent 8e4d39b8c5
commit 28b211bb43
+7 -7
View File
@@ -538,14 +538,14 @@ void close_bincue(void *fh)
CueSheet *cs = (CueSheet *) fh;
CDPlayer *player = CSToPlayer(cs);
if (player == currently_playing) {
CDStop_bincue(fh);
assert(currently_playing == NULL);
}
players.remove(player);
if (cs && player) {
if (player == currently_playing) {
CDStop_bincue(fh);
assert(currently_playing == NULL);
}
players.remove(player);
free(cs);
#ifdef USE_SDL_AUDIO
ClosePlayerStream(player);