1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 04:20:29 +00:00

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

This commit is contained in:
Evil Eye 2021-10-13 22:40:07 +02:00
parent ec6451e93a
commit 4a6464ea67

View File

@ -224,7 +224,16 @@ namespace MWSound
stopMusic();
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->init([&] {