Skip to content

Commit

Permalink
Handle null Type in GetHashCode (#52115)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tornhoof authored May 1, 2021
1 parent a46f7e9 commit 91e9005
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public override int GetHashCode()
{
unchecked
{
return (Type.GetHashCode() * 397) ^ Slot;
return ((Type?.GetHashCode() ?? 23) * 397) ^ Slot;
}
}
}
Expand Down

0 comments on commit 91e9005

Please sign in to comment.