diff --git a/source/games/sw/src/sounds.cpp b/source/games/sw/src/sounds.cpp index b81bf6b6c..e0343fcd1 100644 --- a/source/games/sw/src/sounds.cpp +++ b/source/games/sw/src/sounds.cpp @@ -946,7 +946,7 @@ int PlayerYellVocs[] = bool PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track, bool isThemeTrack) //(nullptr, nullptr, -1, false) starts the normal level music. { // Play CD audio if enabled. - if (cdaudio_track >= 0 && (mus_redbook || *song_file_name == 0)) + if (cdaudio_track >= 0 && (mus_redbook || !song_file_name || *song_file_name == 0)) { FStringf trackname("track%02d.ogg", cdaudio_track); if (!Mus_Play(mapname, trackname, true)) @@ -955,6 +955,10 @@ bool PlaySong(const char* mapname, const char* song_file_name, int cdaudio_track } else return true; } + if (!song_file_name || *song_file_name == 0) + { + return true; + } if (!Mus_Play(mapname, song_file_name, true)) { // try the CD track anyway if no MIDI could be found (the original game doesn't have any MIDI, it was CD Audio only, this avoids no music playing if mus_redbook is off.)