Fix two missed cases of get_main_inventory

This commit is contained in:
Cooldude2606 committed 2026-04-14 21:31:26 +01:00
1 parent 255cc4c325
commit 2219b58000
2 files changed
+3 -3

No files matched your search

@@ -116,9 +116,9 @@ function inventory_sync.deserialize_player(player, finished_record)
-- Transfer items from stashed inventory
if stashed_corpse then
local main = player.get_main_inventory()
local stash = stashed_corpse.get_inventory(defines.inventory.character_corpse)
if main then
if player.character then
local main = player.character.get_main_inventory()
for i = 1, #stash do
-- Try transferring a stack
local source = stash[i]