From 2235213e02b48d485890453540f430fca0b099f5 Mon Sep 17 00:00:00 2001 From: luk3yx Date: Fri, 23 Apr 2021 09:30:28 +1200 Subject: [PATCH] Don't crash when showing HUD to offline player This makes the API more consistent with the formspec one --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index a047db0..abc1739 100644 --- a/init.lua +++ b/init.lua @@ -320,6 +320,7 @@ local z_indexes = {} function hud_fs.show_hud(player, formname, formspec) if type(player) == "string" then player = minetest.get_player_by_name(player) + if not player then return end end local name = player:get_player_name()