aboutsummaryrefslogtreecommitdiffstats
path: root/src/lua/lua_cdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/lua_cdb.c')
-rw-r--r--src/lua/lua_cdb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/lua/lua_cdb.c b/src/lua/lua_cdb.c
index de0ac67a0..b0e6df32e 100644
--- a/src/lua/lua_cdb.c
+++ b/src/lua/lua_cdb.c
@@ -85,6 +85,10 @@ lua_cdb_get_name (lua_State *L)
{
struct cdb *cdb = lua_check_cdb (L);
+ if (!cdb) {
+ lua_error (L);
+ return 1;
+ }
lua_pushstring (L, cdb->filename);
return 1;
}
@@ -98,6 +102,10 @@ lua_cdb_lookup (lua_State *L)
gsize vlen;
gint64 vpos;
+ if (!cdb) {
+ lua_error (L);
+ return 1;
+ }
/*
* XXX: this code is placed here because event_loop is called inside workers, so start
* monitoring on first check, not on creation