summaryrefslogtreecommitdiffstats
path: root/source/PluginLua.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/PluginLua.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/PluginLua.cpp b/source/PluginLua.cpp
index 5128ef0b0..44b36f8f8 100644
--- a/source/PluginLua.cpp
+++ b/source/PluginLua.cpp
@@ -36,7 +36,10 @@ cPluginLua::cPluginLua(const AString & a_PluginDirectory) :
cPluginLua::~cPluginLua()
{
cCSLock Lock(m_CriticalSection);
- m_LuaState.Close();
+ if (m_LuaState.IsValid())
+ {
+ m_LuaState.Close();
+ }
}