Fix NullReferenceException

This commit is contained in:
Karpik 2025-08-11 15:38:12 +03:00 committed by GitHub
parent 1c09c94c3e
commit d67afc74a0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1105,7 +1105,7 @@ namespace DCFApixels.DragonECS
public ReadOnlySpan<object> GetComponentsFor(int entityID) public ReadOnlySpan<object> GetComponentsFor(int entityID)
{ {
int count = GetComponentTypeIDsFor_Internal(entityID, ref _componentIDsBuffer); int count = GetComponentTypeIDsFor_Internal(entityID, ref _componentIDsBuffer);
ArrayUtility.UpsizeWithoutCopy(ref _componentIDsBuffer, count); ArrayUtility.UpsizeWithoutCopy(ref _componentsBuffer, count);
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {