summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/MirLua/src/Modules/m_json.cpp2
-rw-r--r--plugins/MirLua/src/metatable.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/plugins/MirLua/src/Modules/m_json.cpp b/plugins/MirLua/src/Modules/m_json.cpp
index db45f77065..35a6eb1ba9 100644
--- a/plugins/MirLua/src/Modules/m_json.cpp
+++ b/plugins/MirLua/src/Modules/m_json.cpp
@@ -168,7 +168,7 @@ static int json__pairsIterator(lua_State *L)
static int json__pairs(lua_State *L)
{
- JSONNode *node = *(JSONNode**)luaL_checkudata(L, 1, MT_JSON);
+ luaL_checkudata(L, 1, MT_JSON);
lua_pushinteger(L, 0);
lua_pushcclosure(L, json__pairsIterator, 1);
diff --git a/plugins/MirLua/src/metatable.h b/plugins/MirLua/src/metatable.h
index aa736428ca..82d4e07c21 100644
--- a/plugins/MirLua/src/metatable.h
+++ b/plugins/MirLua/src/metatable.h
@@ -29,6 +29,8 @@ public:
CMTField(const char *name, int type) :
name(mir_strdup(name)), type(type) {}
+ virtual ~CMTField() {}
+
const char* GetName() const { return name; }
int GetType() const { return type; }