aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lmdb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lmdb.c b/lmdb.c
index 41bb2cf..f81d555 100644
--- a/lmdb.c
+++ b/lmdb.c
@@ -391,8 +391,9 @@ static void mt(lua_State *L, const char *name, const struct luaL_Reg l[]) {
if (lua_isnil(L, -1)){
lua_pop(L, 1);
lua_setfield(L, -1, "__index");
+ } else {
+ lua_pop(L, 2);
}
- lua_pop(L, 2);
}
static void parentmap(lua_State *L) {