Skip to content

Commit

Permalink
chore: null check for Serialize<T> (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
VisualBean authored Mar 30, 2024
1 parent 0199420 commit f3bff4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ public static void Serialize<T>(
throw new ArgumentNullException(nameof(stream));
}

if (settings is null)
{
throw new ArgumentNullException(nameof(settings));
}

var streamWriter = new FormattingStreamWriter(stream, settings.CultureInfo);

IAsyncApiWriter writer = format switch
Expand Down

0 comments on commit f3bff4a

Please sign in to comment.