1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-07 07:10:04 +02:00

Fixed infinite loop

This commit is contained in:
Ivan Savenko 2022-12-13 15:17:42 +02:00
parent 99e5569ab5
commit 55d0f0ad9f

View File

@ -225,9 +225,8 @@ void BattleProjectileController::emitStackProjectile(const CStack * stack)
void BattleProjectileController::showProjectiles(Canvas & canvas) void BattleProjectileController::showProjectiles(Canvas & canvas)
{ {
for ( auto it = projectiles.begin(); it != projectiles.end();) for ( auto projectile: projectiles)
{ {
auto projectile = *it;
if ( projectile->playing ) if ( projectile->playing )
projectile->show(canvas); projectile->show(canvas);
} }