1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix possible crash on starting 2nd battle while intro sound from 1st one

is still playing
This commit is contained in:
Ivan Savenko
2023-12-13 19:35:02 +02:00
parent 873fd33e7a
commit a1f34e059a

View File

@@ -107,7 +107,8 @@ void BattleInterface::playIntroSoundAndUnlockInterface()
{
auto onIntroPlayed = [this]()
{
if(LOCPLINT->battleInt)
// Make sure that battle have not ended while intro was playing AND that a different one has not started
if(LOCPLINT->battleInt.get() == this)
onIntroSoundPlayed();
};