From: Vsevolod Stakhov Date: Fri, 1 Mar 2019 11:05:04 +0000 (+0000) Subject: [Minor] Allow nil as returned type X-Git-Tag: 1.9.0~63 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d17ca75aa180e424a4d53c1ffad31644170f096;p=rspamd.git [Minor] Allow nil as returned type --- diff --git a/src/lua/lua_config.c b/src/lua/lua_config.c index 9d7f3341c..884467e10 100644 --- a/src/lua/lua_config.c +++ b/src/lua/lua_config.c @@ -1170,6 +1170,10 @@ lua_metric_symbol_callback (struct rspamd_task *task, else if (type == LUA_TNUMBER) { res = lua_tonumber (L, level + 1); } + else if (type == LUA_TNIL) { + /* Can happen sometimes... */ + res = FALSE; + } else { g_assert_not_reached (); }