summaryrefslogtreecommitdiff
path: root/xmake/core/base/dump.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-07-23 22:52:11 +0800
committerruki <[email protected]>2019-07-23 11:13:08 +0800
commit726997c8d83f2a9dff3bb96685dd35ea555e7b8c (patch)
tree76d46809f104fef638e9aae69e4f2da2896336e3 /xmake/core/base/dump.lua
parentf2d08b55a0ea44c89ced43267a5c6f8b8829ac58 (diff)
fix metatable is nil
Diffstat (limited to 'xmake/core/base/dump.lua')
-rw-r--r--xmake/core/base/dump.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/base/dump.lua b/xmake/core/base/dump.lua
index 469454fa8..199dc1e19 100644
--- a/xmake/core/base/dump.lua
+++ b/xmake/core/base/dump.lua
@@ -235,8 +235,10 @@ function dump._get_printed_set(printed_set, value)
local first_level = not printed_set
if type(printed_set) ~= "table" then
printed_set = {id = 0, refs = {}}
- printed_set[value] = {obj = value}
- dump._init_printed_set(printed_set, value)
+ if type(value) == "table" then
+ printed_set[value] = {obj = value}
+ dump._init_printed_set(printed_set, value)
+ end
end
return printed_set, first_level
end