From 1b5151533711e1c14f78c1e65c4902506b27ba1f Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Thu, 6 Oct 2016 21:56:13 +0100 Subject: [Minor] Fix runtime issues --- src/libserver/cfg_rcl.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/libserver') diff --git a/src/libserver/cfg_rcl.c b/src/libserver/cfg_rcl.c index b770e14ad..5cfd73ee3 100644 --- a/src/libserver/cfg_rcl.c +++ b/src/libserver/cfg_rcl.c @@ -880,6 +880,12 @@ rspamd_rcl_set_lua_globals (struct rspamd_config *cfg, lua_State *L, lua_setglobal (L, "rspamd_classifiers"); } + lua_getglobal (L, "classifiers"); + if (lua_isnil (L, -1)) { + lua_newtable (L); + lua_setglobal (L, "classifiers"); + } + lua_getglobal (L, "rspamd_version"); if (lua_isnil (L, -1)) { lua_pushcfunction (L, rspamd_rcl_lua_version); -- cgit v1.2.3