ref: 091dd88f194e52fbd8f806993d711e0cb798073a
parent: 2a8488bfe0f4529017d7fcfd2bef1ad5d306562b
author: rrt <rrt>
date: Fri Jan 12 05:39:13 EST 2007
Stop if no Lua script given
--- a/src/luaform.c
+++ b/src/luaform.c
@@ -54,7 +54,10 @@
lua->L = st_lua_new();
- if ((ret = luaL_loadfile(lua->L, ft->signal.lua_script)) != 0) {
+ if (!ft->signal.lua_script) {
+ st_fail("no Lua script given");
+ return ST_EOF;
+ } else if ((ret = luaL_loadfile(lua->L, ft->signal.lua_script)) != 0) {
st_fail("cannot load Lua script %s: error %d", ft->signal.lua_script, ret);
return ST_EOF;
}