mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-24 08:32:34 +02:00
Fix possible thread race on accessing GuiHandler from server handler
thread without acquiring lock
This commit is contained in:
parent
00ac8eb306
commit
8b628221ec
@ -88,6 +88,8 @@ template<typename T> class CApplyOnLobby : public CBaseForLobbyApply
|
||||
public:
|
||||
bool applyOnLobbyHandler(CServerHandler * handler, void * pack) const override
|
||||
{
|
||||
boost::unique_lock<boost::recursive_mutex> un(*CPlayerInterface::pim);
|
||||
|
||||
T * ptr = static_cast<T *>(pack);
|
||||
ApplyOnLobbyHandlerNetPackVisitor visitor(*handler);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user