Fix StackOverflowException when comparing Identifiers (#136)

This commit is contained in:
MoshiMoshi0
2019-09-26 22:41:14 +02:00
committed by Phyxion
parent aa4cde1ea5
commit 61454e1ae2
@@ -86,12 +86,11 @@ namespace LibreHardwareMonitor.Hardware
}
public static bool operator ==(Identifier id1, Identifier id2)
{
if (id1 == null && id2 == null)
{
if (ReferenceEquals(id1, null) && ReferenceEquals(id2, null))
return true;
return id1 != null && id1.Equals(id2);
return !ReferenceEquals(id1, null) && id1.Equals(id2);
}
public static bool operator !=(Identifier id1, Identifier id2)