Fix error due to unchecked JSON parsing

This commit is contained in:
rubenwardy 2021-01-10 17:17:57 +00:00
parent 9c74a3f85a
commit 6dc91cf893

@ -80,7 +80,8 @@ function awards.load()
os.rename(old_save_path, minetest.get_worldpath().."/awards.bk.txt")
awards.save()
else
__player_data = minetest.parse_json(storage:get_string("player_data")) or {}
local json = storage:get("player_data")
__player_data = json and minetest.parse_json(json) or {}
end
end