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:
hikerstk 2009-09-17 11:31:05 +00:00
parent 7d4d50afe3
commit 2031e495b1

View File

@ -188,8 +188,18 @@ MusicInformation* SoundManager::getMusicInformation(const std::string& filename)
MusicInformation* mi = m_allMusic[basename];
if(!mi)
{
mi = new MusicInformation(filename);
m_allMusic[basename] = mi;
try
{
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);
return mi;