Skip to content

Commit 4912c44

Browse files
committed
fix warning by checking value for null before returning from TryPeek
1 parent 68ea927 commit 4912c44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Framework/Intersect.Framework/Collections/ConcurrentConditionalDequeue.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public bool TryPeek([NotNullWhen(true)] out TValue? value)
119119
{
120120
lock (_dequeueLock)
121121
{
122-
return _queue.TryPeek(out value);
122+
return _queue.TryPeek(out value) && value != null;
123123
}
124124
}
125125

0 commit comments

Comments
 (0)