If a music file is not found, STK will not abort but continue.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4029 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
7d4d50afe3
commit
2031e495b1
@ -188,8 +188,18 @@ MusicInformation* SoundManager::getMusicInformation(const std::string& filename)
|
|||||||
MusicInformation* mi = m_allMusic[basename];
|
MusicInformation* mi = m_allMusic[basename];
|
||||||
if(!mi)
|
if(!mi)
|
||||||
{
|
{
|
||||||
mi = new MusicInformation(filename);
|
try
|
||||||
m_allMusic[basename] = mi;
|
{
|
||||||
|
mi = new MusicInformation(filename);
|
||||||
|
m_allMusic[basename] = mi;
|
||||||
|
}
|
||||||
|
catch (std::exception &e)
|
||||||
|
{
|
||||||
|
(void)e;
|
||||||
|
printf("Can't open music file '%s'.\n", filename);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
mi->volumeMusic(m_masterGain);
|
mi->volumeMusic(m_masterGain);
|
||||||
return mi;
|
return mi;
|
||||||
|
Loading…
Reference in New Issue
Block a user