1
0
mirror of https://github.com/minetest-mods/3d_armor.git synced 2025-06-28 14:26:18 +02:00

More protection from un-initialized player crashes

This commit is contained in:
stujones11
2017-04-13 19:47:43 +01:00
parent b4283f6e60
commit de2c47f334
4 changed files with 51 additions and 35 deletions

View File

@ -57,10 +57,8 @@ wieldview.update_wielded_item = function(self, player)
if self.wielded_item[name] == item then
return
end
if armor.textures[name] then
armor.textures[name].wielditem = self:get_item_texture(item)
armor:update_player_visuals(player)
end
armor.textures[name].wielditem = self:get_item_texture(item)
armor:update_player_visuals(player)
end
self.wielded_item[name] = item
end