浏览代码

Merge pull request #3122 from vcmi/fix-2993

#2993 - destruct battle info first when destructing CGameState
Andrii Danylchenko 2 年之前
父节点
当前提交
caffc8f3cd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      lib/gameState/CGameState.cpp

+ 2 - 0
lib/gameState/CGameState.cpp

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