mirror of
https://github.com/mt-mods/signs_lib.git
synced 2025-01-12 08:40:23 +01:00
protect against nil player on rightclick
(some mods' machines don't supply a valid player object)
This commit is contained in:
parent
02c19e89d9
commit
3ee06f9ba2
2
api.lua
2
api.lua
@ -707,7 +707,7 @@ end
|
||||
|
||||
function signs_lib.rightclick_sign(pos, node, player, itemstack, pointed_thing)
|
||||
|
||||
if not signs_lib.can_modify(pos, player) then return end
|
||||
if not player or not signs_lib.can_modify(pos, player) then return end
|
||||
|
||||
player:get_meta():set_string("signslib:pos", minetest.pos_to_string(pos))
|
||||
minetest.show_formspec(player:get_player_name(), "signs_lib:sign", get_sign_formspec(pos, node.name))
|
||||
|
Loading…
Reference in New Issue
Block a user