From 5c01f365b75a52e4f8b7ce6e1da077f53a864f80 Mon Sep 17 00:00:00 2001 From: octacian Date: Fri, 7 Jul 2017 19:23:53 -0700 Subject: [PATCH] Fix crash when managing privileges of offline players --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 823d6d3..71054c7 100644 --- a/init.lua +++ b/init.lua @@ -77,6 +77,10 @@ function ranks.update_privs(player, trigger) player = minetest.get_player_by_name(player) end + if not player then + return + end + local name = player:get_player_name() local rank = ranks.get_rank(player) if rank then