summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/cPlugin_NewLua.h2
-rw-r--r--source/cWebPlugin_Lua.cpp1
2 files changed, 3 insertions, 0 deletions
diff --git a/source/cPlugin_NewLua.h b/source/cPlugin_NewLua.h
index 1d931530b..20b74b490 100644
--- a/source/cPlugin_NewLua.h
+++ b/source/cPlugin_NewLua.h
@@ -49,6 +49,8 @@ public: //tolua_export
lua_State* GetLuaState() { return m_LuaState; }
cWebPlugin_Lua* CreateWebPlugin(lua_State* a_LuaState); //tolua_export
+
+ cCriticalSection & GetCriticalSection() { return m_CriticalSection; }
private:
bool PushFunction( const char* a_FunctionName, bool a_bLogError = true );
bool CallFunction( int a_NumArgs, int a_NumResults, const char* a_FunctionName ); // a_FunctionName is only used for error messages, nothing else
diff --git a/source/cWebPlugin_Lua.cpp b/source/cWebPlugin_Lua.cpp
index e22c59961..7d17378f9 100644
--- a/source/cWebPlugin_Lua.cpp
+++ b/source/cWebPlugin_Lua.cpp
@@ -79,6 +79,7 @@ bool cWebPlugin_Lua::AddTab( const char* a_Title, lua_State * a_LuaState, int a_
std::string cWebPlugin_Lua::HandleRequest( HTTPRequest* a_Request )
{
+ cCSLock( m_Plugin->GetCriticalSection() );
lua_State* LuaState = m_Plugin->GetLuaState();
std::string RetVal = "";