Skip to content

Commit 3e81317

Browse files
committed
add: null check
1 parent 6e2391c commit 3e81317

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Scripts/Runtime/Core/CollectionsRegistry.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,9 @@ public bool TryGetCollectionsOfItemType(Type targetType, out List<ScriptableObje
127127
{
128128
ScriptableObjectCollection collection = Collections[i];
129129

130+
if (collection == null)
131+
continue;
132+
130133
if (collection.GetItemType() == targetType || collection.GetItemType().IsAssignableFrom(targetType))
131134
{
132135
availables.Add(collection);

0 commit comments

Comments
 (0)