Patch Painting crashing on bad data

Sometimes theere will be a troublesome painting that will crash the serverupon being loaded. this should hopefully keep the server from crashing.
This commit is contained in:
Elkien3 2017-09-18 11:16:48 -05:00
parent f6bc6053cc
commit 6c04f6101c

View File

@ -507,6 +507,9 @@ minetest.register_alias("canvas", "painting:canvas_16")
-- fixes the colours which were set by pairs
local function fix_eldest_grid(data)
if data == nil then
return
end
for y in pairs(data) do
local xs = data[y]
for x in pairs(xs) do