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:
parent
c3debe530f
commit
a773262328
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user