initialize loaded data if nil

This commit is contained in:
Tai Kedzierski 2019-01-26 15:52:08 +00:00
parent 64c38157e6
commit 10b5e167bf

View File

@ -63,7 +63,7 @@ local function prefload()
minetest.log("error", "[babelfish] Data read failed")
return
end
player_pref_language = minetest.deserialize(file:read("*a"))
player_pref_language = minetest.deserialize(file:read("*a")) or {}
file:close()
end