From caa740df79f1475374e0d0e0481567d120bd3789 Mon Sep 17 00:00:00 2001 From: Přemysl Janouch Date: Fri, 27 Jan 2017 04:02:21 +0100 Subject: Lua: don't die on unspecified detectors --- hex.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hex.c b/hex.c index 5aa9220..9a0a0b2 100644 --- a/hex.c +++ b/hex.c @@ -1037,6 +1037,9 @@ app_lua_chunk_identify (lua_State *L) struct app_lua_coder *coder; while ((coder = str_map_iter_next (&iter))) { + if (coder->ref_detect == LUA_REFNIL) + continue; + lua_rawgeti (L, LUA_REGISTRYINDEX, coder->ref_detect); // Clone the chunk first to reset its read position -- cgit v1.2.3-70-g09d2