Fix crash
This commit is contained in:
parent
9e844d8d71
commit
1568de3449
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ check_grapple("shooter_hook:grapple_hook")
|
|||
local old_grapple_step = minetest.registered_entities["shooter_hook:hook"].on_step
|
||||
minetest.registered_entities["shooter_hook:hook"].on_step = function(self, dtime, ...)
|
||||
-- User left the game. Life is no longer worth living for this poor hook
|
||||
if not self.user then
|
||||
if not self.user or not minetest.get_player_by_name(self.user) then
|
||||
self.object:remove()
|
||||
return
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue