Fixed invalid name openal error when setting the volume of fast

music (apparently caused by trying to set the music of the actually
freeded normal music just before).
This commit is contained in:
hiker 2015-02-05 15:22:20 +11:00
parent 5f59985ef1
commit 0ab3d12eab

View File

@ -301,8 +301,10 @@ void MusicInformation::resumeMusic()
void MusicInformation::volumeMusic(float gain)
{
m_adjusted_gain = m_gain * gain;
if (m_normal_music != NULL) m_normal_music->volumeMusic(m_adjusted_gain);
if (m_fast_music != NULL) m_fast_music->volumeMusic(m_adjusted_gain);
if (m_normal_music && m_normal_music->isPlaying())
m_normal_music->volumeMusic(m_adjusted_gain);
if (m_fast_music && m_fast_music->isPlaying())
m_fast_music->volumeMusic(m_adjusted_gain);
} // volumeMusic
//-----------------------------------------------------------------------------