diff --git a/FrEee/Objects/Technology/MountedComponentTemplate.cs b/FrEee/Objects/Technology/MountedComponentTemplate.cs index 0ce1ec71..13f3d68d 100644 --- a/FrEee/Objects/Technology/MountedComponentTemplate.cs +++ b/FrEee/Objects/Technology/MountedComponentTemplate.cs @@ -359,7 +359,8 @@ public override bool Equals(object? obj) public override int GetHashCode() { - return HashCodeMasher.Mash(Container, ComponentTemplate, Mount); + // can't mash the container itself because that would cause a circular dependency on this template + return HashCodeMasher.Mash(Container?.ID, ComponentTemplate, Mount); } /// diff --git a/FrEee/Utility/HashCodeMasher.cs b/FrEee/Utility/HashCodeMasher.cs index 4c629f84..762a4fce 100644 --- a/FrEee/Utility/HashCodeMasher.cs +++ b/FrEee/Utility/HashCodeMasher.cs @@ -8,7 +8,7 @@ namespace FrEee.Utility; /// public static class HashCodeMasher { - public static int Mash(params object[] objs) + public static int Mash(params object?[] objs) { return MashList(objs); }