Skip to content

Commit 3ea84c3

Browse files
committed
fix: [独自マップ構文]識別子読込でnullストラクチャーを処理できない不具合を修正
1 parent 220c37a commit 3ea84c3

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

AtsEx/MapStatements/StatementSet.Factory.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static StatementSet Create(IDictionary<string, MapObjectList> repeatedStr
2828

2929
string argument = sameKeyRepeaters.Key;
3030
Identifier[] declaration = GetDeclaration(repeater.Models);
31-
if (declaration.Length == 0) continue;
31+
if (declaration.Length == 0 || declaration[0] is null) continue;
3232

3333
Identifier name = declaration[0];
3434
if (name.Namespace is null || !name.Namespace.IsChildOf(Namespace.Root)) continue;
@@ -52,6 +52,7 @@ Identifier[] GetDeclaration(WrappedList<Model> models)
5252
for (int i = 0; i < models.Count; i++)
5353
{
5454
result[i] =
55+
models[i] is null ||
5556
!loadedModels.TryGetValue(models[i], out string structureKey) ||
5657
!Identifier.TryParse(structureKey, out Identifier identifier) ? null : identifier;
5758
}

0 commit comments

Comments
 (0)