Skip to content

Commit

Permalink
Merge pull request #1 from BuckarooBanzay/patch-1
Browse files Browse the repository at this point in the history
prevent crash if "o:get_luaentity()" returns nil
  • Loading branch information
gbl08ma committed Jul 22, 2020
2 parents 636c776 + 6ac3135 commit 7c71192
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ end
local clearscreen = function(pos)
local objects = minetest.get_objects_inside_radius(pos, 0.5)
for _, o in ipairs(objects) do
if o:get_luaentity().name == "textline:text" then
if o:get_luaentity() and o:get_luaentity().name == "textline:text" then
o:remove()
end
end
Expand Down

0 comments on commit 7c71192

Please sign in to comment.