Add nil check for player when changing skinsdb textures
This commit is contained in:
parent
20e11b7711
commit
dadca4d319
12
api.lua
12
api.lua
|
@ -2528,8 +2528,12 @@ function XBowsQuiver.hide_3d_quiver(self, player)
|
||||||
local player_textures
|
local player_textures
|
||||||
|
|
||||||
if self.skinsdb then
|
if self.skinsdb then
|
||||||
minetest.after(1, function()
|
minetest.after(1, function(v_player)
|
||||||
local textures = player_api.get_textures(player)
|
if not v_player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local textures = player_api.get_textures(v_player)
|
||||||
|
|
||||||
---cleanup
|
---cleanup
|
||||||
for index, value in ipairs(textures) do
|
for index, value in ipairs(textures) do
|
||||||
|
@ -2545,9 +2549,9 @@ function XBowsQuiver.hide_3d_quiver(self, player)
|
||||||
player_textures = textures
|
player_textures = textures
|
||||||
|
|
||||||
if player_textures then
|
if player_textures then
|
||||||
player_api.set_textures(player, player_textures)
|
player_api.set_textures(v_player, player_textures)
|
||||||
end
|
end
|
||||||
end)
|
end, player)
|
||||||
|
|
||||||
return
|
return
|
||||||
elseif self._3d_armor then
|
elseif self._3d_armor then
|
||||||
|
|
Ŝarĝante…
Reference in New Issue