1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Merge pull request #3122 from vcmi/fix-2993

#2993 - destruct battle info first when destructing CGameState
This commit is contained in:
Andrii Danylchenko 2023-10-31 21:43:55 +02:00 committed by GitHub
commit caffc8f3cd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -409,6 +409,8 @@ CGameState::CGameState()
CGameState::~CGameState()
{
// explicitly delete all ongoing battles first - BattleInfo destructor requires valid CGameState
currentBattles.clear();
map.dellNull();
}