From 9a76d59086a46d065565502c55810b2147e074ba Mon Sep 17 00:00:00 2001 From: Signal Date: Sat, 11 Oct 2025 00:03:51 -0400 Subject: [PATCH] Fix crash with wearables --- mods/rgt_cosmetics/wearables.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mods/rgt_cosmetics/wearables.lua b/mods/rgt_cosmetics/wearables.lua index 222abba..6864664 100644 --- a/mods/rgt_cosmetics/wearables.lua +++ b/mods/rgt_cosmetics/wearables.lua @@ -63,9 +63,9 @@ function ns.apply_wearable_part(m, w, i) end 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. - if m.wearing[w.name] then return end + if not w or m.wearing[w.name] then return end local item = {} for i, x in ipairs(w.attachments) do x.name = w.name