mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Attempt to fix crash on quitApplication on Android
This commit is contained in:
parent
ef0cd0ba6e
commit
00ac8eb306
@ -77,7 +77,6 @@
|
||||
#define COMPLAIN_RETF(txt, FORMAT) {complain(boost::str(boost::format(txt) % FORMAT)); return false;}
|
||||
|
||||
CondSh<bool> battleMadeAction(false);
|
||||
boost::recursive_mutex battleActionMutex;
|
||||
CondSh<BattleResult *> battleResult(nullptr);
|
||||
template <typename T> class CApplyOnGH;
|
||||
|
||||
|
@ -102,6 +102,8 @@ class CGameHandler : public IGameCallback, public CBattleInfoCallback, public En
|
||||
std::unique_ptr<boost::thread> battleThread;
|
||||
|
||||
public:
|
||||
boost::recursive_mutex battleActionMutex;
|
||||
|
||||
std::unique_ptr<HeroPoolProcessor> heroPool;
|
||||
|
||||
using FireShieldInfo = std::vector<std::pair<const CStack *, int64_t>>;
|
||||
|
@ -25,8 +25,6 @@
|
||||
#include "../lib/spells/ISpellMechanics.h"
|
||||
#include "../lib/serializer/Cast.h"
|
||||
|
||||
extern boost::recursive_mutex battleActionMutex;
|
||||
|
||||
void ApplyGhNetPackVisitor::visitSaveGame(SaveGame & pack)
|
||||
{
|
||||
gh.save(pack.fname);
|
||||
@ -282,7 +280,7 @@ void ApplyGhNetPackVisitor::visitQueryReply(QueryReply & pack)
|
||||
|
||||
void ApplyGhNetPackVisitor::visitMakeAction(MakeAction & pack)
|
||||
{
|
||||
boost::unique_lock lock(battleActionMutex);
|
||||
boost::unique_lock lock(gh.battleActionMutex);
|
||||
|
||||
const BattleInfo * b = gs.curB;
|
||||
if(!b)
|
||||
@ -311,7 +309,7 @@ void ApplyGhNetPackVisitor::visitMakeAction(MakeAction & pack)
|
||||
|
||||
void ApplyGhNetPackVisitor::visitMakeCustomAction(MakeCustomAction & pack)
|
||||
{
|
||||
boost::unique_lock lock(battleActionMutex);
|
||||
boost::unique_lock lock(gh.battleActionMutex);
|
||||
|
||||
const BattleInfo * b = gs.curB;
|
||||
if(!b)
|
||||
|
Loading…
Reference in New Issue
Block a user