aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hex.c3
1 files changed, 3 insertions, 0 deletions
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