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:
parent
f6bc6053cc
commit
6c04f6101c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user