Skip to content

Commit

Permalink
Fix null reference exception in MutableValue.Equals
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Dec 4, 2024
1 parent 3e55bba commit 95399b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Lucene.Net/Util/Mutable/MutableValue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public virtual int CompareTo(object other)

public override bool Equals(object other)
{
return (this.GetType() == other.GetType()) && this.EqualsSameType(other);
return this.GetType() == other?.GetType() && this.EqualsSameType(other);
}

public override abstract int GetHashCode();
Expand Down

0 comments on commit 95399b4

Please sign in to comment.