Eluna add mutex lock for hook calls

This commit is contained in:
Rochet2
2015-01-03 22:20:30 +02:00
parent 5bf5b11c6f
commit 092c61c20b
3 changed files with 14 additions and 0 deletions

View File

@@ -26,6 +26,7 @@ LuaEvent::~LuaEvent()
void LuaEvent::Execute()
{
ELUNA_LOCK(*events->E);
// In multithread get map from object and the map's lua state
lua_rawgeti((*events->E)->L, LUA_REGISTRYINDEX, funcRef);
Eluna::Push((*events->E)->L, funcRef);