Fix crash with wearables
This commit is contained in:
parent
5e4d2924e4
commit
9a76d59086
1 changed files with 2 additions and 2 deletions
|
|
@ -63,9 +63,9 @@ function ns.apply_wearable_part(m, w, i)
|
||||||
end
|
end
|
||||||
|
|
||||||
function ns.apply_wearable(m, wearable)
|
function ns.apply_wearable(m, wearable)
|
||||||
local w = type(wearable) == "string" and ns.wearables[wearable] or wearable
|
local w = ns.wearables[wearable]
|
||||||
-- Do nothing if we're already wearing this.
|
-- Do nothing if we're already wearing this.
|
||||||
if m.wearing[w.name] then return end
|
if not w or m.wearing[w.name] then return end
|
||||||
local item = {}
|
local item = {}
|
||||||
for i, x in ipairs(w.attachments) do
|
for i, x in ipairs(w.attachments) do
|
||||||
x.name = w.name
|
x.name = w.name
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue