Skip to content

Commit 0cf00eb

Browse files
committed
C#: Re-introduce null check in cached entity hash code calculation.
1 parent 69e8621 commit 0cf00eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

csharp/extractor/Semmle.Extraction/Entities/Base/CachedEntity`1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public string DebugContents
5454

5555
public override bool NeedsPopulation { get; }
5656

57-
public override int GetHashCode() => Symbol.GetHashCode();
57+
public override int GetHashCode() => Symbol is null ? 0 : Symbol.GetHashCode();
5858

5959
public override bool Equals(object? obj)
6060
{

0 commit comments

Comments
 (0)