From 267f28f8ed29911e9bec709478b8a2ad2ccc68db Mon Sep 17 00:00:00 2001 From: Connor J <93505368+connorj00@users.noreply.github.com> Date: Fri, 7 Aug 2026 11:49:15 +0100 Subject: [PATCH] Fix MLO entity deletion when archetype has no portals --- CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs index f5fa40836..a7ea57d3e 100644 --- a/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs +++ b/CodeWalker.Core/GameFiles/MetaTypes/Archetype.cs @@ -380,6 +380,8 @@ public void RemoveEntitySet(MCMloEntitySet set) private void FixPortalIndexes(int deletedIndex) { + if (portals == null) return; + foreach (var portal in portals) { List newAttachedObjects = new List();