summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2013-08-20 20:42:43 +0200
committermadmaxoft <github@xoft.cz>2013-08-20 20:42:43 +0200
commit61b968601aea48186f9f0ae1a7d88bcac6c67bd6 (patch)
tree4f44de939099911b5edae3c559dc9ca1e42bbbda /source
parentSmall Linux fixes. (diff)
downloadcuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar.gz
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar.bz2
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar.lz
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar.xz
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.tar.zst
cuberite-61b968601aea48186f9f0ae1a7d88bcac6c67bd6.zip
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();
+ }
}