1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Fix possible unprotected access to battleint

This commit is contained in:
Ivan Savenko 2023-08-21 01:35:05 +03:00
parent a44c08a847
commit 3eb19e6ed7

View File

@ -105,11 +105,9 @@ void BattleInterface::playIntroSoundAndUnlockInterface()
{
auto onIntroPlayed = [this]()
{
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
if(LOCPLINT->battleInt)
{
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
onIntroSoundPlayed();
}
};
int battleIntroSoundChannel = CCS->soundh->playSoundFromSet(CCS->soundh->battleIntroSounds);