Skip to content

Commit 88c0dfd

Browse files
committed
Minor code tweaks
1 parent f158abe commit 88c0dfd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Microsoft.Toolkit.HighPerformance/Buffers/ArrayPoolBufferWriter{T}.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,9 @@ public Span<T> GetSpan(int sizeHint = 0)
254254
[MethodImpl(MethodImplOptions.AggressiveInlining)]
255255
private void CheckBufferAndEnsureCapacity(int sizeHint)
256256
{
257-
if (this.array is null)
257+
T[]? array = this.array;
258+
259+
if (array is null)
258260
{
259261
ThrowObjectDisposedException();
260262
}

0 commit comments

Comments
 (0)