1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

Fix crash on starting battle in MP

This commit is contained in:
Ivan Savenko 2023-11-09 00:33:34 +02:00
parent 18c0217679
commit 359af84d59
2 changed files with 4 additions and 1 deletions

View File

@ -641,6 +641,9 @@ void CClient::battleFinished(const BattleID & battleID)
void CClient::startPlayerBattleAction(const BattleID & battleID, PlayerColor color) void CClient::startPlayerBattleAction(const BattleID & battleID, PlayerColor color)
{ {
if (battleints.count(color) == 0)
return; // not our combat in MP
auto battleint = battleints.at(color); auto battleint = battleints.at(color);
if (!battleint->human) if (!battleint->human)

View File

@ -21,7 +21,7 @@ class Canvas;
VCMI_LIB_NAMESPACE_BEGIN VCMI_LIB_NAMESPACE_BEGIN
class CArmedInstance; class CArmedInstance;
VCMI_LIB_NAMESPACE_BEGIN VCMI_LIB_NAMESPACE_END
class IUpdateable class IUpdateable
{ {