From 11872bda9b6499894fbb054ee73a5864173d98f6 Mon Sep 17 00:00:00 2001 From: kilbith Date: Thu, 24 Sep 2015 10:38:07 +0200 Subject: [PATCH] Work Table : fix crash when mod name is not declared in table and one of its node is put --- worktable.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/worktable.lua b/worktable.lua index bfa796d..34cb275 100644 --- a/worktable.lua +++ b/worktable.lua @@ -97,8 +97,10 @@ function worktable.dig(pos, _) end function worktable.contains(table, element) - for _, value in pairs(table) do - if value == element then return true end + if table then + for _, value in pairs(table) do + if value == element then return true end + end end return false end