Fix possible crash in creative mod

master
Wuzzy 2018-01-07 19:47:33 +01:00
parent 7446804835
commit b000bc5c3f
1 changed files with 1 additions and 1 deletions

View File

@ -64,7 +64,7 @@ function creative.update_creative_inventory(player_name, tab_content)
for name, def in pairs(items) do
if def.name:find(inv.filter, 1, true) or
def.description:lower():find(inv.filter, 1, true) then
(type(def.description) == "string" and def.description:lower():find(inv.filter, 1, true)) then
creative_list[#creative_list+1] = name
end
end