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

Merge pull request #2566 from IvanSavenko/fix_lobby_thread_race

Fix crash on video playback (and who knows how many more)
This commit is contained in:
Ivan Savenko 2023-08-13 00:45:24 +03:00 committed by GitHub
commit abf7c48593
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);