Call MoveNext before accessing Current

This commit is contained in:
Malte Rosenbjerg 2024-12-04 21:29:37 +02:00
parent 0cd4e076ff
commit cf8f7cc674

View file

@ -27,7 +27,7 @@ public string GetStreamArguments()
public async Task WriteAsync(Stream outputStream, CancellationToken cancellationToken)
{
if (_sampleEnumerator.Current != null)
if (_sampleEnumerator.MoveNext() && _sampleEnumerator.Current != null)
{
await _sampleEnumerator.Current.SerializeAsync(outputStream, cancellationToken).ConfigureAwait(false);
}