Avoid crash in case of problems with sound.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11952 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk
2012-11-15 02:04:03 +00:00
parent 3b4c5f3bbb
commit 8fa7b8a0d0

View File

@@ -142,7 +142,8 @@ void LinearWorld::update(float dt)
if (m_last_lap_sfx_playing &&
m_last_lap_sfx->getStatus() != SFXManager::SFX_PLAYING)
{
music_manager->getCurrentMusic()->resetTemporaryVolume();
if(music_manager->getCurrentMusic())
music_manager->getCurrentMusic()->resetTemporaryVolume();
m_last_lap_sfx_playing = false;
}