Fix crash when managing privileges of offline players
This commit is contained in:
parent
fb5fde7687
commit
5c01f365b7
4
init.lua
4
init.lua
@ -77,6 +77,10 @@ function ranks.update_privs(player, trigger)
|
|||||||
player = minetest.get_player_by_name(player)
|
player = minetest.get_player_by_name(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if not player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local rank = ranks.get_rank(player)
|
local rank = ranks.get_rank(player)
|
||||||
if rank then
|
if rank then
|
||||||
|
Loading…
Reference in New Issue
Block a user