Skip to content

Commit f3bff4a

Browse files
authored
chore: null check for Serialize<T> (#165)
1 parent 0199420 commit f3bff4a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/LEGO.AsyncAPI/Models/AsyncApiSerializableExtensions.cs

+5
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ public static void Serialize<T>(
109109
throw new ArgumentNullException(nameof(stream));
110110
}
111111

112+
if (settings is null)
113+
{
114+
throw new ArgumentNullException(nameof(settings));
115+
}
116+
112117
var streamWriter = new FormattingStreamWriter(stream, settings.CultureInfo);
113118

114119
IAsyncApiWriter writer = format switch

0 commit comments

Comments
 (0)