From e677d3787045a2fd97363a6da5758bd9d1cf53e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Sun, 22 Aug 2021 00:27:45 -0700 Subject: [PATCH] make sure door.data isn't nil --- MWSE/mods/celediel/NPCsGoHome/functions/processors.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua index cd1724f..ddc60a8 100644 --- a/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua +++ b/MWSE/mods/celediel/NPCsGoHome/functions/processors.lua @@ -377,7 +377,7 @@ this.processDoors = function(cell) -- unlock, don't need all the extra overhead that comes along with checks.isIgnoredDoor here for door in cell:iterateReferences(tes3.objectType.door) do -- only unlock doors that we locked before - if door.data.NPCsGoHome and door.data.NPCsGoHome.modified then + if door.data and door.data.NPCsGoHome and door.data.NPCsGoHome.modified then door.data.NPCsGoHome.modified = false tes3.setLockLevel({reference = door, level = 0})