diff --git a/media/lua/client/TOC_HelperFunctions.lua b/media/lua/client/TOC_HelperFunctions.lua index 589a3a9..de19ac3 100644 --- a/media/lua/client/TOC_HelperFunctions.lua +++ b/media/lua/client/TOC_HelperFunctions.lua @@ -90,6 +90,7 @@ end -- Override helper function CheckIfItemIsAmputatedLimb(item) + local item_full_type = item:getFullType() diff --git a/media/lua/client/TOC_OverridenFunctions.lua b/media/lua/client/TOC_OverridenFunctions.lua index 107f51c..8aad3f5 100644 --- a/media/lua/client/TOC_OverridenFunctions.lua +++ b/media/lua/client/TOC_OverridenFunctions.lua @@ -132,6 +132,10 @@ end local og_ISInventoryPaneContextMenuUnequipItem = ISInventoryPaneContextMenu.unequipItem function ISInventoryPaneContextMenu.unequipItem(item, player) + + if item == nil then + return + end if CheckIfItemIsAmputatedLimb(item) == false and CheckIfItemIsInstalledProsthesis(item) == false then og_ISInventoryPaneContextMenuUnequipItem(item, player) end