mirror of
https://github.com/OpenMW/openmw.git
synced 2025-11-02 17:56:41 +00:00
Prevent streamMusic from throwing an exception
This commit is contained in:
parent
207d7dd89e
commit
2f6b73d461
1 changed files with 10 additions and 1 deletions
|
|
@ -165,8 +165,17 @@ 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())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
streamMusicFull(filePath);
|
streamMusicFull(filePath);
|
||||||
}
|
}
|
||||||
|
catch(std::exception &e)
|
||||||
|
{
|
||||||
|
std::cout << "Music Error: " << e.what() << "\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SoundManager::startRandomTitle()
|
void SoundManager::startRandomTitle()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue