mtg_craftguide: fix nil error

Fixes: "ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from /home/xanadu/.minetest/mods/mtg_craftguide/init.lua:412: attempt to index local 'info' (a nil value)"

It seems that some 5.x clients cause a "[Server]: static int ModApiServer::l_get_player_information(lua_state*): peer was not found" issue and cause nil to be returned for the player information fields.
This commit is contained in:
tenplus1 2021-01-08 14:35:15 +00:00 committed by GitHub
parent 1ade8941b4
commit 42478293ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -410,7 +410,7 @@ minetest.register_on_joinplayer(function(player)
filter = "", filter = "",
pagenum = 1, pagenum = 1,
items = init_items, items = init_items,
lang_code = info.lang_code lang_code = info and info.lang_code or "en"
} }
end) end)