add nil check for player in morgut.lua

This commit is contained in:
tenplus1 2024-05-05 07:39:59 +01:00
parent 5a9ea84082
commit 721390483d

View File

@ -130,7 +130,7 @@ mobs:register_mob("nssm:morgut", {
minetest.after(1, function(self)
if self and self.attack:is_player() then
if self and self.attack and self.attack:is_player() then
local pname = self.attack:get_player_name()
local player_inv = minetest.get_inventory(