Skip to content

Commit 6894002

Browse files
committed
Fixed exception.
1 parent 1ba884b commit 6894002

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/Arch/Core/ComponentRegistry.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,6 @@ public static ComponentType GetComponentType(Type type)
408408
/// </summary>
409409
/// <param name="obj">The <see cref="ComponentType"/> array.</param>
410410
/// <returns>A unique hashcode for the contained elements, regardless of their order.</returns>
411-
412411
public static int GetHashCode(Span<ComponentType> obj)
413412
{
414413
// Search for the highest id to determine how much uints we need for the stack.
@@ -440,7 +439,6 @@ public static int GetHashCode(Span<ComponentType> obj)
440439
/// </summary>
441440
/// <param name="span">The <see cref="Span{T}"/>.</param>
442441
/// <returns>A unique hashcode for the contained elements.</returns>
443-
444442
public static int GetHashCode(Span<uint> span)
445443
{
446444
var hashCode = new HashCode();

src/Arch/Core/EntityInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ internal void Move(Archetype archetype, Slot slot)
100100
/// <returns>True or false.</returns>
101101
public bool Equals(EntityData other)
102102
{
103-
return Version == other.Version && Archetype.Equals(other.Archetype) && Slot.Equals(other.Slot);
103+
return Version == other.Version && Archetype != null && Archetype.Equals(other.Archetype) && Slot.Equals(other.Slot);
104104
}
105105

106106
/// <summary>

0 commit comments

Comments
 (0)