summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-06-15 15:52:22 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-06-15 15:52:22 +0000
commit27985042841f1ea60156ed532e0b9f57e9c3b369 (patch)
treedfb25c2cbdb9b1d8896ce47d9620dd9a569ecf0b /plugins/MirLua/src/mlua.cpp
parentff55088a637a2716d1ab950b42b992cce78f4f6b (diff)
MirLua: added options page
git-svn-id: http://svn.miranda-ng.org/main/trunk@14179 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua.cpp')
-rw-r--r--plugins/MirLua/src/mlua.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/MirLua/src/mlua.cpp b/plugins/MirLua/src/mlua.cpp
index a389e155f1..e67caf6272 100644
--- a/plugins/MirLua/src/mlua.cpp
+++ b/plugins/MirLua/src/mlua.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-CMLua::CMLua()
+CMLua::CMLua() : L(NULL)
{
L = luaL_newstate();
luaL_openlibs(L);
@@ -24,7 +24,8 @@ CMLua::CMLua()
CMLua::~CMLua()
{
- lua_close(L);
+ if(L)
+ lua_close(L);
}
void CMLua::AddPath(const char *path)