Fix StackOverflowException when comparing Identifiers (#136)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user