1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Merge branch 'morrowland_the_musical' into 'master'

Stop trying to play non-existent music files started by scripts

See merge request OpenMW/openmw!1293
This commit is contained in:
psi29a 2021-10-14 15:25:11 +00:00
commit 29082ff658

View File

@ -224,7 +224,16 @@ namespace MWSound
stopMusic(); stopMusic();
DecoderPtr decoder = getDecoder(); DecoderPtr decoder = getDecoder();
decoder->open(filename); try
{
decoder->open(filename);
}
catch(std::exception &e)
{
Log(Debug::Error) << "Failed to load audio from " << filename << ": " << e.what();
return;
}
mMusic = getStreamRef(); mMusic = getStreamRef();
mMusic->init([&] { mMusic->init([&] {