mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-28 06:30:36 -04:00
Prevent streamMusic from throwing an exception
This commit is contained in:
parent
207d7dd89e
commit
2f6b73d461
@ -165,7 +165,16 @@ namespace MWSound
|
|||||||
{
|
{
|
||||||
std::string filePath = mMusicLibrary.locate(filename, mFSStrict, true).string();
|
std::string filePath = mMusicLibrary.locate(filename, mFSStrict, true).string();
|
||||||
if(!filePath.empty())
|
if(!filePath.empty())
|
||||||
streamMusicFull(filePath);
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
streamMusicFull(filePath);
|
||||||
|
}
|
||||||
|
catch(std::exception &e)
|
||||||
|
{
|
||||||
|
std::cout << "Music Error: " << e.what() << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SoundManager::startRandomTitle()
|
void SoundManager::startRandomTitle()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user