Fix crash if spawnpoint.conf does not exist

master
octacian 2017-03-14 20:46:02 -07:00
parent 5844868589
commit 4de1fd23bc
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ end
-- [function] Load -- [function] Load
function spawnpoint.load() function spawnpoint.load()
local res = io.open(path, "r"):read("*all") local res = io.open(path, "r"):read("*all")
if res ~= "" then if res and res ~= "" then
spawnpoint.pos = minetest.string_to_pos(res) spawnpoint.pos = minetest.string_to_pos(res)
end end
end end