mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Attempt to fix / trace crashes from Google Play statistics
This commit is contained in:
@@ -163,6 +163,7 @@ BattleInterface::~BattleInterface()
|
||||
if (adventureInt)
|
||||
adventureInt->onAudioResumed();
|
||||
|
||||
awaitingEvents.clear();
|
||||
onAnimationsFinished();
|
||||
}
|
||||
|
||||
@@ -781,8 +782,19 @@ void BattleInterface::onAnimationsFinished()
|
||||
|
||||
void BattleInterface::waitForAnimations()
|
||||
{
|
||||
auto unlockPim = vstd::makeUnlockGuard(*CPlayerInterface::pim);
|
||||
ongoingAnimationsState.waitUntil(false);
|
||||
{
|
||||
auto unlockPim = vstd::makeUnlockGuard(*CPlayerInterface::pim);
|
||||
ongoingAnimationsState.waitUntil(false);
|
||||
}
|
||||
|
||||
assert(!hasAnimations());
|
||||
assert(awaitingEvents.empty());
|
||||
|
||||
if (!awaitingEvents.empty())
|
||||
{
|
||||
logGlobal->error("Wait for animations finished but we still have awaiting events!");
|
||||
awaitingEvents.clear();
|
||||
}
|
||||
}
|
||||
|
||||
bool BattleInterface::hasAnimations()
|
||||
|
||||
Reference in New Issue
Block a user