Skip to content

Commit

Permalink
Merge pull request #374 from P3tray/patch-1
Browse files Browse the repository at this point in the history
Account for characters without an inventory
  • Loading branch information
alexgrist authored Dec 24, 2024
2 parents 8c3cbcf + 1db4cfc commit 4e49199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gamemode/core/meta/sh_item.lua
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ function ITEM:GetOwner()
for _, v in player.Iterator() do
local character = v:GetCharacter()

if (character and character:GetInventory():GetItemByID(id)) then
if (character and character:GetInventory() and character:GetInventory():GetItemByID(id)) then
return v
end
end
Expand Down

0 comments on commit 4e49199

Please sign in to comment.