1
0
mirror of https://github.com/rwengine/openrw.git synced 2024-11-07 03:12:36 +01:00

Fix crash in SoundManager when pausing

This commit is contained in:
Daniel Evans 2015-04-03 01:26:55 +01:00
parent c3debe530f
commit a773262328

View File

@ -30,12 +30,15 @@ bool SoundManager::playBackground(const std::string& fileName)
void SoundManager::pause(bool p)
{
if( p )
if( backgroundNoise )
{
backgroundNoise->pause();
}
else
{
backgroundNoise->play();
if( p )
{
backgroundNoise->pause();
}
else
{
backgroundNoise->play();
}
}
}